diff --git a/CHANGELOG.md b/CHANGELOG.md index 275aefde4..a9aebb16b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th ## [UNRELEASED] -No user facing changes. +- Update `@actions/*` npm packages to their latest versions. [#3366](https://github.com/github/codeql-action/pull/3366) ## 4.31.8 - 11 Dec 2025 diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 598310387..c93f3ff94 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var os = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve5({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path6 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path6 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path6.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path6 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs7 = __importStar2(require("fs")); + var path6 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs7.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs7.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path6.dirname(filePath); const upperName = path6.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path6.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path6 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path6 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path6 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path6 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner5 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path6.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable5; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug4; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info7; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar4(require("os")); - var path6 = __importStar4(require("path")); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable5(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable5; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path6.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug4(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug4; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info7(message) { process.stdout.write(message + os.EOL); } - exports2.info = info7; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs7 = __importStar4(require("fs")); - var path6 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs7.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path6.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path6.dirname(filePath); - const upperName = path6.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path6.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path6 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path6.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path6.join(dest, path6.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path6.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path6.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path6.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs7.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs7.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve5(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve5(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve5(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve5(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve5(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path6 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path6.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar2(require("fs")); + var path6 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path6 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path6 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path6.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve5(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path6.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path6 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path6 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname2; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path6.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path6 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path6 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path6.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path6.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path6.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path6 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path6.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path6.sep}`)) { homedir = homedir || os.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path6 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core2()); + var fs7 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path6 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs7.promises.lstat(searchPath)); + yield __await2(fs7.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path6.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); + }); + }; + } + function settle(resolve5, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve5({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core2()); + var fs7 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path6 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path6.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs7.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs7.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create3; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path6 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path6.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path6.dirname(filePath); - const upperName = path6.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path6.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path6 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path6.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path6.join(dest, path6.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path6.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path6.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path6.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create3(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var path6 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var path6 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path6.join(baseLocation, "actions", "temp"); } - const dest = path6.join(tempDirectory, crypto.randomUUID()); + const dest = path6.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs7.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs7.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs7.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug5, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug5(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug4 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug4("azure"); - AzureLogger.log = (...args) => { - debug4.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug4.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug4.disable(); - debug4.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve5, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve5(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { - token = setTimeout(resolve5, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path6, preserveJsx) { + if (typeof path6 === "string" && /^\.\.?\//.test(path6)) { + return path6.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path6; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay(delayInMs, value, options) { - return new Promise((resolve5, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve5(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug4, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug4(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve5) => { + const handler = () => { + resolve5(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve5, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve5) : node_https_1.default.request(options, resolve5); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve5, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve5(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay(delayInMs, value, options) { + return new Promise((resolve5, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve5(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve5, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug4 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug4 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path6, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path6, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve5, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve5(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { + token = setTimeout(resolve5, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve5) => { - const handler = () => { - resolve5(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve5, reject) => { - const req = isInsecure ? http.request(options, resolve5) : https2.request(options, resolve5); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve5, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve5(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info7; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _2 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _2), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve5, reject) => { - this.resolve = resolve5; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs7 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs7); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path6 = urlParsed.pathname; path6 = path6 || "/"; path6 = escape(path6); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url, name) { + const urlParsed = new URL(url); let path6 = urlParsed.pathname; path6 = path6 ? path6.endsWith("/") ? `${path6}${name}` : `${path6}/${name}` : name; urlParsed.pathname = path6; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path6 = getURLPath(request.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path6}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve5, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve5).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve5(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path6 = urlParsed.pathname; + path6 = path6 || "/"; + path6 = escape(path6); + urlParsed.pathname = path6; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path6 = urlParsed.pathname; + path6 = path6 ? path6.endsWith("/") ? `${path6}${name}` : `${path6}/${name}` : name; + urlParsed.pathname = path6; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve5, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve5(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path6 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path6}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path6 = getURLPath(request.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path6}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path6 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path6}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve5, reject) => { + this.resolve = resolve5; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve5, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve5).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve5(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve5, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve5(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve5(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve5, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve5(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve5, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve5(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve5, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve5) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve5(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve5) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve5(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path6 = getURLPath(subRequest.url); + const path6 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path6 || path6 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path6 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path6 = (0, utils_common_js_1.getURLPath)(url); if (path6 && path6 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve5) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve5(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve5) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs7 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs7 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs7.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs7.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve5) => { timeoutHandle = setTimeout(() => resolve5("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs7 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs7 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs7.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path6 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path6 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path6.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path6 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var path6 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path6 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path6.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path6.dirname(filePath); - const upperName = path6.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path6.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path6 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path6.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path6.join(dest, path6.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path6.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path6.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path6.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os = require("os"); - var cp = require("child_process"); - var fs7 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs7.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs7.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs7.existsSync(lsbReleaseFile)) { - contents = fs7.readFileSync(lsbReleaseFile).toString(); - } else if (fs7.existsSync(osReleaseFile)) { - contents = fs7.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path6 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path6.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar2(require("fs")); + var path6 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path6 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path6 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path6.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve5(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path6.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os = require("os"); + var cp = require("child_process"); + var fs7 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs7.existsSync(lsbReleaseFile)) { + contents = fs7.readFileSync(lsbReleaseFile).toString(); + } else if (fs7.existsSync(osReleaseFile)) { + contents = fs7.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os = __importStar4(require("os")); - var path6 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core3()); + var io6 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path6.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path6.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path6.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs7.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path6.join(_getTempDirectory(), crypto.randomUUID()); + dest = path6.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path6.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug4; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug4 = require_debug2(); + var debug4 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80322,7 +87202,7 @@ var require_follow_redirects = __commonJS({ var require_config2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -80334,7 +87214,7 @@ var require_config2 = __commonJS({ exports2.getConcurrency = getConcurrency; exports2.getUploadChunkTimeout = getUploadChunkTimeout; exports2.getMaxArtifactListCount = getMaxArtifactListCount; - var os_1 = __importDefault4(require("os")); + var os_1 = __importDefault2(require("os")); var core_1 = require_core(); function getUploadChunkSize() { return 8 * 1024 * 1024; @@ -80418,13 +87298,13 @@ var require_timestamp = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Timestamp = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var Timestamp$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.Timestamp", [ @@ -80567,13 +87447,13 @@ var require_wrappers = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BytesValue = exports2.StringValue = exports2.BoolValue = exports2.UInt32Value = exports2.Int32Value = exports2.UInt64Value = exports2.Int64Value = exports2.FloatValue = exports2.DoubleValue = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var DoubleValue$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.DoubleValue", [ @@ -81159,12 +88039,12 @@ var require_artifact = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArtifactService = exports2.DeleteArtifactResponse = exports2.DeleteArtifactRequest = exports2.GetSignedArtifactURLResponse = exports2.GetSignedArtifactURLRequest = exports2.ListArtifactsResponse_MonolithArtifact = exports2.ListArtifactsResponse = exports2.ListArtifactsRequest = exports2.FinalizeArtifactResponse = exports2.FinalizeArtifactRequest = exports2.CreateArtifactResponse = exports2.CreateArtifactRequest = exports2.FinalizeMigratedArtifactResponse = exports2.FinalizeMigratedArtifactRequest = exports2.MigrateArtifactResponse = exports2.MigrateArtifactRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var wrappers_1 = require_wrappers(); var wrappers_2 = require_wrappers(); var timestamp_1 = require_timestamp(); @@ -82366,7 +89246,7 @@ var require_artifact_twirp_client = __commonJS({ var require_generated = __commonJS({ "node_modules/@actions/artifact/lib/generated/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82379,14 +89259,14 @@ var require_generated = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar4(require_timestamp(), exports2); - __exportStar4(require_wrappers(), exports2); - __exportStar4(require_artifact(), exports2); - __exportStar4(require_artifact_twirp_client(), exports2); + __exportStar2(require_timestamp(), exports2); + __exportStar2(require_wrappers(), exports2); + __exportStar2(require_artifact(), exports2); + __exportStar2(require_artifact_twirp_client(), exports2); } }); @@ -82394,7 +89274,7 @@ var require_generated = __commonJS({ var require_retention = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/retention.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82407,34 +89287,34 @@ var require_retention = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = getExpiration; var generated_1 = require_generated(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; @@ -82519,817 +89399,12 @@ The following characters are not allowed in files that are uploaded due to limit } }); -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js -var require_proxy6 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js -var require_lib7 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy6()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js -var require_auth3 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact/package.json var require_package3 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", - version: "4.0.0", + version: "5.0.1", preview: true, description: "Actions artifact lib", keywords: [ @@ -83369,11 +89444,10 @@ var require_package3 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.10.0", + "@actions/core": "^2.0.0", "@actions/github": "^6.0.1", - "@actions/http-client": "^2.1.0", - "@azure/core-http": "^3.0.5", - "@azure/storage-blob": "^12.15.0", + "@actions/http-client": "^3.0.0", + "@azure/storage-blob": "^12.29.1", "@octokit/core": "^5.2.1", "@octokit/plugin-request-log": "^1.0.4", "@octokit/plugin-retry": "^3.0.9", @@ -83547,10 +89621,10 @@ var require_jwt_decode_cjs = __commonJS({ }); // node_modules/@actions/artifact/lib/internal/shared/util.js -var require_util11 = __commonJS({ +var require_util10 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83563,40 +89637,40 @@ var require_util11 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = getBackendIdsFromToken; exports2.maskSigUrl = maskSigUrl; exports2.maskSecretUrls = maskSecretUrls; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var config_1 = require_config2(); - var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); + var jwt_decode_1 = __importDefault2(require_jwt_decode_cjs()); var core_1 = require_core(); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); function getBackendIdsFromToken() { @@ -83660,7 +89734,7 @@ var require_util11 = __commonJS({ var require_artifact_twirp_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/artifact-twirp-client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -83689,14 +89763,14 @@ var require_artifact_twirp_client2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.internalArtifactTwirpClient = internalArtifactTwirpClient; - var http_client_1 = require_lib7(); - var auth_1 = require_auth3(); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); var core_1 = require_core(); var generated_1 = require_generated(); var config_1 = require_config2(); var user_agent_1 = require_user_agent2(); var errors_1 = require_errors3(); - var util_1 = require_util11(); + var util_1 = require_util10(); var ArtifactHttpClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -83720,14 +89794,14 @@ var require_artifact_twirp_client2 = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -83737,7 +89811,7 @@ var require_artifact_twirp_client2 = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -83808,7 +89882,7 @@ var require_artifact_twirp_client2 = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } @@ -83835,7 +89909,7 @@ var require_artifact_twirp_client2 = __commonJS({ var require_upload_zip_specification = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-zip-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83848,34 +89922,34 @@ var require_upload_zip_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - var fs7 = __importStar4(require("fs")); + var fs7 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); @@ -83929,7 +90003,7 @@ var require_upload_zip_specification = __commonJS({ var require_blob_upload = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/blob-upload.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83942,31 +90016,31 @@ var require_blob_upload = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -83995,18 +90069,18 @@ var require_blob_upload = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadZipToBlobStorage = uploadZipToBlobStorage; - var storage_blob_1 = require_dist7(); + var storage_blob_1 = require_commonjs15(); var config_1 = require_config2(); - var core14 = __importStar4(require_core()); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); + var core14 = __importStar2(require_core()); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); var errors_1 = require_errors3(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let uploadByteCount = 0; let lastProgressTime = Date.now(); const abortController = new AbortController(); - const chunkTimer = (interval) => __awaiter4(this, void 0, void 0, function* () { + const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { @@ -84036,7 +90110,7 @@ var require_blob_upload = __commonJS({ }; let sha256Hash = void 0; const uploadStream = new stream.PassThrough(); - const hashStream = crypto.createHash("sha256"); + const hashStream = crypto2.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); core14.info("Beginning upload of artifact content to blob storage"); @@ -85926,8 +92000,8 @@ var require_async = __commonJS({ var mapLimit$1 = awaitify(mapLimit, 4); function concatLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, ...args) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { if (err) return iterCb(err); return iterCb(err, args); }); @@ -86133,10 +92207,10 @@ var require_async = __commonJS({ var forever$1 = awaitify(forever, 2); function groupByLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, key) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { if (err) return iterCb(err); - return iterCb(err, { key, val: val2 }); + return iterCb(err, { key, val }); }); }, (err, mapResults) => { var result = {}; @@ -86144,11 +92218,11 @@ var require_async = __commonJS({ for (var i = 0; i < mapResults.length; i++) { if (mapResults[i]) { var { key } = mapResults[i]; - var { val: val2 } = mapResults[i]; + var { val } = mapResults[i]; if (hasOwnProperty.call(result, key)) { - result[key].push(val2); + result[key].push(val); } else { - result[key] = [val2]; + result[key] = [val]; } } } @@ -86167,8 +92241,8 @@ var require_async = __commonJS({ callback = once(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); - return eachOfLimit$2(limit)(obj, (val2, key, next) => { - _iteratee(val2, key, (err, result) => { + return eachOfLimit$2(limit)(obj, (val, key, next) => { + _iteratee(val, key, (err, result) => { if (err) return next(err); newObj[key] = result; next(err); @@ -87488,8 +93562,8 @@ var require_graceful_fs = __commonJS({ get: function() { return ReadStream; }, - set: function(val2) { - ReadStream = val2; + set: function(val) { + ReadStream = val; }, enumerable: true, configurable: true @@ -87498,8 +93572,8 @@ var require_graceful_fs = __commonJS({ get: function() { return WriteStream; }, - set: function(val2) { - WriteStream = val2; + set: function(val) { + WriteStream = val; }, enumerable: true, configurable: true @@ -87509,8 +93583,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileReadStream; }, - set: function(val2) { - FileReadStream = val2; + set: function(val) { + FileReadStream = val; }, enumerable: true, configurable: true @@ -87520,8 +93594,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileWriteStream; }, - set: function(val2) { - FileWriteStream = val2; + set: function(val) { + FileWriteStream = val; }, enumerable: true, configurable: true @@ -87775,7 +93849,7 @@ var require_safe_buffer = __commonJS({ }); // node_modules/core-util-is/lib/util.js -var require_util12 = __commonJS({ +var require_util11 = __commonJS({ "node_modules/core-util-is/lib/util.js"(exports2) { function isArray(arg) { if (Array.isArray) { @@ -88057,7 +94131,7 @@ var require_stream_writable = __commonJS({ var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() @@ -88493,7 +94567,7 @@ var require_stream_duplex = __commonJS({ return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var Readable = require_stream_readable(); var Writable = require_stream_writable(); @@ -88818,7 +94892,7 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var debugUtil = require("util"); var debug4 = void 0; @@ -89487,7 +95561,7 @@ var require_stream_transform = __commonJS({ "use strict"; module2.exports = Transform; var Duplex = require_stream_duplex(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(Transform, Duplex); function afterTransform(er, data) { @@ -89587,7 +95661,7 @@ var require_stream_passthrough = __commonJS({ "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(PassThrough, Transform); function PassThrough(options) { @@ -90505,8 +96579,8 @@ var require_primordials = __commonJS({ PromiseReject(err) { return Promise.reject(err); }, - PromiseResolve(val2) { - return Promise.resolve(val2); + PromiseResolve(val) { + return Promise.resolve(val); }, ReflectApply: Reflect.apply, RegExpPrototypeTest(self2, value) { @@ -91211,7 +97285,7 @@ var require_abort_controller = __commonJS({ }); // node_modules/readable-stream/lib/ours/util.js -var require_util13 = __commonJS({ +var require_util12 = __commonJS({ "node_modules/readable-stream/lib/ours/util.js"(exports2, module2) { "use strict"; var bufferModule = require("buffer"); @@ -91402,7 +97476,7 @@ var require_util13 = __commonJS({ var require_errors4 = __commonJS({ "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; - var { format, inspect, AggregateError: CustomAggregateError } = require_util13(); + var { format, inspect, AggregateError: CustomAggregateError } = require_util12(); var AggregateError = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); var kTypes = [ @@ -91425,14 +97499,14 @@ var require_errors4 = __commonJS({ throw new codes.ERR_INTERNAL_ASSERTION(message); } } - function addNumericalSeparator(val2) { + function addNumericalSeparator(val) { let res = ""; - let i = val2.length; - const start = val2[0] === "-" ? 1 : 0; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; for (; i >= start + 4; i -= 3) { - res = `_${val2.slice(i - 3, i)}${res}`; + res = `_${val.slice(i - 3, i)}${res}`; } - return `${val2.slice(0, i)}${res}`; + return `${val.slice(0, i)}${res}`; } function getMessage(key, msg, args) { if (typeof msg === "function") { @@ -91738,8 +97812,8 @@ var require_validators = __commonJS({ hideStackFrames, codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } } = require_errors4(); - var { normalizeEncoding } = require_util13(); - var { isAsyncFunction, isArrayBufferView } = require_util13().types; + var { normalizeEncoding } = require_util12(); + var { isAsyncFunction, isArrayBufferView } = require_util12().types; var signals = {}; function isInt32(value) { return value === (value | 0); @@ -91986,7 +98060,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils6 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -92200,7 +98274,7 @@ var require_end_of_stream = __commonJS({ var process2 = require_process(); var { AbortError, codes } = require_errors4(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once } = require_util13(); + var { kEmptyObject, once } = require_util12(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -92218,7 +98292,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils6(); + } = require_utils9(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -92373,7 +98447,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -92400,7 +98474,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -92456,7 +98530,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors4(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils9(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -92794,7 +98868,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors4(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils9(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -92830,7 +98904,7 @@ var require_add_abort_signal = __commonJS({ if (signal.aborted) { onAbort(); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(signal, onAbort); eos(stream, disposable[SymbolDispose]); } @@ -92845,7 +98919,7 @@ var require_buffer_list = __commonJS({ "use strict"; var { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array: Uint8Array2 } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); - var { inspect } = require_util13(); + var { inspect } = require_util12(); module2.exports = class BufferList { constructor() { this.head = null; @@ -93156,7 +99230,7 @@ var require_readable3 = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); - var debug4 = require_util13().debuglog("stream", (fn) => { + var debug4 = require_util12().debuglog("stream", (fn) => { debug4 = fn; }); var BufferList = require_buffer_list(); @@ -93901,9 +99975,9 @@ var require_readable3 = __commonJS({ const r = this._readableState; return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted; }, - set(val2) { + set(val) { if (this._readableState) { - this._readableState.readable = !!val2; + this._readableState.readable = !!val; } } }, @@ -94615,9 +100689,9 @@ var require_writable = __commonJS({ const w = this._writableState; return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended; }, - set(val2) { + set(val) { if (this._writableState) { - this._writableState.writable = !!val2; + this._writableState.writable = !!val; } } }, @@ -94731,7 +100805,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils6(); + } = require_utils9(); var eos = require_end_of_stream(); var { AbortError, @@ -94741,7 +100815,7 @@ var require_duplexify = __commonJS({ var Duplex = require_duplex(); var Readable = require_readable3(); var Writable = require_writable(); - var { createDeferredPromise } = require_util13(); + var { createDeferredPromise } = require_util12(); var from = require_from(); var Blob2 = globalThis.Blob || bufferModule.Blob; var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { @@ -94814,9 +100888,9 @@ var require_duplexify = __commonJS({ const promise = FunctionPrototypeCall( then2, value, - (val2) => { - if (val2 != null) { - throw new ERR_INVALID_RETURN_VALUE("nully", "body", val2); + (val) => { + if (val != null) { + throw new ERR_INVALID_RETURN_VALUE("nully", "body", val); } }, (err) => { @@ -94870,9 +100944,9 @@ var require_duplexify = __commonJS({ FunctionPrototypeCall( then, body, - (val2) => { - if (val2 != null) { - d.push(val2); + (val) => { + if (val != null) { + d.push(val); } d.push(null); }, @@ -95255,13 +101329,13 @@ var require_transform = __commonJS({ const rState = this._readableState; const wState = this._writableState; const length = rState.length; - this._transform(chunk, encoding, (err, val2) => { + this._transform(chunk, encoding, (err, val) => { if (err) { callback(err); return; } - if (val2 != null) { - this.push(val2); + if (val != null) { + this.push(val); } if (wState.ended || // Backwards compat. length === rState.length || // Backwards compat. @@ -95302,12 +101376,12 @@ var require_passthrough2 = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/pipeline.js -var require_pipeline3 = __commonJS({ +var require_pipeline4 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { var process2 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once } = require_util13(); + var { once } = require_util12(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -95331,7 +101405,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils6(); + } = require_utils9(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -95364,19 +101438,19 @@ var require_pipeline3 = __commonJS({ validateFunction(streams[streams.length - 1], "streams[stream.length - 1]"); return streams.pop(); } - function makeAsyncIterable(val2) { - if (isIterable(val2)) { - return val2; - } else if (isReadableNodeStream(val2)) { - return fromReadable(val2); + function makeAsyncIterable(val) { + if (isIterable(val)) { + return val; + } else if (isReadableNodeStream(val)) { + return fromReadable(val); } - throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val2); + throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); } - async function* fromReadable(val2) { + async function* fromReadable(val) { if (!Readable) { Readable = require_readable3(); } - yield* Readable.prototype[SymbolAsyncIterator].call(val2); + yield* Readable.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { let error3; @@ -95476,7 +101550,7 @@ var require_pipeline3 = __commonJS({ function abort() { finishImpl(new AbortError()); } - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; let disposable; if (outerSignal) { disposable = addAbortListener(outerSignal, abort); @@ -95577,10 +101651,10 @@ var require_pipeline3 = __commonJS({ finishCount++; then.call( ret, - (val2) => { - value = val2; - if (val2 != null) { - pt.write(val2); + (val) => { + value = val; + if (val != null) { + pt.write(val); } if (end) { pt.end(); @@ -95733,7 +101807,7 @@ var require_pipeline3 = __commonJS({ var require_compose = __commonJS({ "node_modules/readable-stream/lib/internal/streams/compose.js"(exports2, module2) { "use strict"; - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var Duplex = require_duplex(); var { destroyer } = require_destroy2(); var { @@ -95744,7 +101818,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils6(); + } = require_utils9(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -95937,8 +102011,8 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils6(); - var { deprecate } = require_util13(); + var { isWritable, isNodeStream } = require_utils9(); + var { deprecate } = require_util12(); var { ArrayPrototypePush, Boolean: Boolean2, @@ -95991,7 +102065,7 @@ var require_operators = __commonJS({ validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; return async function* map3() { - const signal = require_util13().AbortSignalAny( + const signal = require_util12().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); const stream = this; @@ -96019,7 +102093,7 @@ var require_operators = __commonJS({ } async function pump() { try { - for await (let val2 of stream) { + for await (let val of stream) { if (done) { return; } @@ -96027,17 +102101,17 @@ var require_operators = __commonJS({ throw new AbortError(); } try { - val2 = fn(val2, signalOpt); - if (val2 === kEmpty) { + val = fn(val, signalOpt); + if (val === kEmpty) { continue; } - val2 = PromiseResolve(val2); + val = PromiseResolve(val); } catch (err) { - val2 = PromiseReject(err); + val = PromiseReject(err); } cnt += 1; - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); if (next) { next(); next = null; @@ -96050,9 +102124,9 @@ var require_operators = __commonJS({ } queue.push(kEof); } catch (err) { - const val2 = PromiseReject(err); - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + const val = PromiseReject(err); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); } finally { done = true; if (next) { @@ -96065,15 +102139,15 @@ var require_operators = __commonJS({ try { while (true) { while (queue.length > 0) { - const val2 = await queue[0]; - if (val2 === kEof) { + const val = await queue[0]; + if (val === kEof) { return; } if (signal.aborted) { throw new AbortError(); } - if (val2 !== kEmpty) { - yield val2; + if (val !== kEmpty) { + yield val; } queue.shift(); maybeResume(); @@ -96100,14 +102174,14 @@ var require_operators = __commonJS({ } return async function* asIndexedPairs2() { let index = 0; - for await (const val2 of this) { + for await (const val of this) { var _options$signal; if (options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted) { throw new AbortError({ cause: options.signal.reason }); } - yield [index++, val2]; + yield [index++, val]; } }.call(this); } @@ -96227,22 +102301,22 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } const result = []; - for await (const val2 of this) { + for await (const val of this) { var _options$signal4; if (options !== null && options !== void 0 && (_options$signal4 = options.signal) !== null && _options$signal4 !== void 0 && _options$signal4.aborted) { throw new AbortError(void 0, { cause: options.signal.reason }); } - ArrayPrototypePush(result, val2); + ArrayPrototypePush(result, val); } return result; } function flatMap(fn, options) { const values = map2.call(this, fn, options); return async function* flatMap2() { - for await (const val2 of values) { - yield* val2; + for await (const val of values) { + yield* val; } }.call(this); } @@ -96269,13 +102343,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal6; if (options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted) { throw new AbortError(); } if (number-- <= 0) { - yield val2; + yield val; } } }.call(this); @@ -96293,13 +102367,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal8; if (options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted) { throw new AbortError(); } if (number-- > 0) { - yield val2; + yield val; } if (number <= 0) { return; @@ -96332,8 +102406,8 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils6(); - var { pipelineImpl: pl } = require_pipeline3(); + var { isIterable, isNodeStream, isWebStream } = require_utils9(); + var { pipelineImpl: pl } = require_pipeline4(); var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { @@ -96376,18 +102450,18 @@ var require_stream2 = __commonJS({ var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { promisify: { custom: customPromisify } - } = require_util13(); + } = require_util12(); var { streamReturningOperators, promiseReturningOperators } = require_operators(); var { codes: { ERR_ILLEGAL_CONSTRUCTOR } } = require_errors4(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state3(); - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises3 = require_promises(); - var utils = require_utils6(); + var utils = require_utils9(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -97357,7 +103431,7 @@ var require_isPlainObject = __commonJS({ }); // node_modules/@isaacs/balanced-match/dist/commonjs/index.js -var require_commonjs13 = __commonJS({ +var require_commonjs18 = __commonJS({ "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -97419,12 +103493,12 @@ var require_commonjs13 = __commonJS({ }); // node_modules/@isaacs/brace-expansion/dist/commonjs/index.js -var require_commonjs14 = __commonJS({ +var require_commonjs19 = __commonJS({ "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.expand = expand; - var balanced_match_1 = require_commonjs13(); + var balanced_match_1 = require_commonjs18(); var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; @@ -98239,12 +104313,12 @@ var require_escape = __commonJS({ }); // node_modules/glob/node_modules/minimatch/dist/commonjs/index.js -var require_commonjs15 = __commonJS({ +var require_commonjs20 = __commonJS({ "node_modules/glob/node_modules/minimatch/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = require_commonjs14(); + var brace_expansion_1 = require_commonjs19(); var assert_valid_pattern_js_1 = require_assert_valid_pattern(); var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); @@ -98999,7 +105073,7 @@ var require_commonjs15 = __commonJS({ }); // node_modules/lru-cache/dist/commonjs/index.js -var require_commonjs16 = __commonJS({ +var require_commonjs21 = __commonJS({ "node_modules/lru-cache/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -99895,14 +105969,14 @@ var require_commonjs16 = __commonJS({ pop() { try { while (this.#size) { - const val2 = this.#valList[this.#head]; + const val = this.#valList[this.#head]; this.#evict(true); - if (this.#isBackgroundFetch(val2)) { - if (val2.__staleWhileFetching) { - return val2.__staleWhileFetching; + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; } - } else if (val2 !== void 0) { - return val2; + } else if (val !== void 0) { + return val; } } } finally { @@ -100393,10 +106467,10 @@ var require_commonjs16 = __commonJS({ }); // node_modules/minipass/dist/commonjs/index.js -var require_commonjs17 = __commonJS({ +var require_commonjs22 = __commonJS({ "node_modules/minipass/dist/commonjs/index.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -100406,7 +106480,7 @@ var require_commonjs17 = __commonJS({ stderr: null }; var node_events_1 = require("node:events"); - var node_stream_1 = __importDefault4(require("node:stream")); + var node_stream_1 = __importDefault2(require("node:stream")); var node_string_decoder_1 = require("node:string_decoder"); var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)); exports2.isStream = isStream; @@ -101285,10 +107359,10 @@ var require_commonjs17 = __commonJS({ }); // node_modules/path-scurry/dist/commonjs/index.js -var require_commonjs18 = __commonJS({ +var require_commonjs23 = __commonJS({ "node_modules/path-scurry/dist/commonjs/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -101301,30 +107375,30 @@ var require_commonjs18 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0; - var lru_cache_1 = require_commonjs16(); + var lru_cache_1 = require_commonjs21(); var node_path_1 = require("node:path"); var node_url_1 = require("node:url"); var fs_1 = require("fs"); - var actualFS = __importStar4(require("node:fs")); + var actualFS = __importStar2(require("node:fs")); var realpathSync = fs_1.realpathSync.native; var promises_1 = require("node:fs/promises"); - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var defaultFS = { lstatSync: fs_1.lstatSync, readdir: fs_1.readdir, @@ -103066,7 +109140,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var isPatternList = (pl) => pl.length >= 1; var isGlobList = (gl) => gl.length >= 1; var Pattern = class _Pattern { @@ -103240,7 +109314,7 @@ var require_ignore = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { @@ -103337,7 +109411,7 @@ var require_processor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var HasWalkedCache = class _HasWalkedCache { store; constructor(store = /* @__PURE__ */ new Map()) { @@ -103570,7 +109644,7 @@ var require_walker = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; @@ -103910,9 +109984,9 @@ var require_glob2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Glob = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var node_url_1 = require("node:url"); - var path_scurry_1 = require_commonjs18(); + var path_scurry_1 = require_commonjs23(); var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; @@ -104123,7 +110197,7 @@ var require_has_magic = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasMagic = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var hasMagic = (pattern, options = {}) => { if (!Array.isArray(pattern)) { pattern = [pattern]; @@ -104139,7 +110213,7 @@ var require_has_magic = __commonJS({ }); // node_modules/glob/dist/commonjs/index.js -var require_commonjs19 = __commonJS({ +var require_commonjs24 = __commonJS({ "node_modules/glob/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -104149,10 +110223,10 @@ var require_commonjs19 = __commonJS({ exports2.globSync = globSync; exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); - var minimatch_2 = require_commonjs15(); + var minimatch_2 = require_commonjs20(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { return minimatch_2.escape; } }); @@ -104229,7 +110303,7 @@ var require_file3 = __commonJS({ var difference = require_difference(); var union = require_union(); var isPlainObject = require_isPlainObject(); - var glob2 = require_commonjs19(); + var glob2 = require_commonjs24(); var file = module2.exports = {}; var pathSeparatorRe = /[\/\\]/g; var processPatterns = function(patterns, fn) { @@ -104493,7 +110567,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error2 = __commonJS({ +var require_error3 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -104526,7 +110600,7 @@ var require_error2 = __commonJS({ }); // node_modules/archiver/lib/core.js -var require_core2 = __commonJS({ +var require_core4 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs7 = require("fs"); var glob2 = require_readdir_glob(); @@ -104534,7 +110608,7 @@ var require_core2 = __commonJS({ var path6 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error2(); + var ArchiverError = require_error3(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -105077,7 +111151,7 @@ var require_archive_entry = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/util.js -var require_util14 = __commonJS({ +var require_util13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { var util = module2.exports = {}; util.dateToDos = function(d, forceLocalTime) { @@ -105088,7 +111162,7 @@ var require_util14 = __commonJS({ } else if (year >= 2044) { return 2141175677; } - var val2 = { + var val = { year, month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), date: forceLocalTime ? d.getDate() : d.getUTCDate(), @@ -105096,7 +111170,7 @@ var require_util14 = __commonJS({ minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() }; - return val2.year - 1980 << 25 | val2.month + 1 << 21 | val2.date << 16 | val2.hours << 11 | val2.minutes << 5 | val2.seconds / 2; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; }; util.dosToDate = function(dos) { return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); @@ -105135,7 +111209,7 @@ var require_util14 = __commonJS({ // node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js var require_general_purpose_bit = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { - var zipUtil = require_util14(); + var zipUtil = require_util13(); var DATA_DESCRIPTOR_FLAG = 1 << 3; var ENCRYPTION_FLAG = 1 << 0; var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; @@ -105262,7 +111336,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants9 = __commonJS({ +var require_constants13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -105346,8 +111420,8 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants9(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var zipUtil = require_util13(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { return new ZipArchiveEntry(name); @@ -105527,7 +111601,7 @@ var require_is_stream2 = __commonJS({ }); // node_modules/compress-commons/lib/util/index.js -var require_util15 = __commonJS({ +var require_util14 = __commonJS({ "node_modules/compress-commons/lib/util/index.js"(exports2, module2) { var Stream = require("stream").Stream; var PassThrough = require_ours().PassThrough; @@ -105555,7 +111629,7 @@ var require_archive_output_stream = __commonJS({ var isStream = require_is_stream2(); var Transform = require_ours().Transform; var ArchiveEntry = require_archive_entry(); - var util = require_util15(); + var util = require_util14(); var ArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ArchiveOutputStream)) { return new ArchiveOutputStream(options); @@ -105818,7 +111892,7 @@ var require_deflate_crc32_stream = __commonJS({ }); // node_modules/crc32-stream/lib/index.js -var require_lib8 = __commonJS({ +var require_lib6 = __commonJS({ "node_modules/crc32-stream/lib/index.js"(exports2, module2) { "use strict"; module2.exports = { @@ -105833,14 +111907,14 @@ var require_zip_archive_output_stream = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { var inherits = require("util").inherits; var crc32 = require_crc32(); - var { CRC32Stream } = require_lib8(); - var { DeflateCRC32Stream } = require_lib8(); + var { CRC32Stream } = require_lib6(); + var { DeflateCRC32Stream } = require_lib6(); var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants9(); - var util = require_util15(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var util = require_util14(); + var zipUtil = require_util13(); var ZipArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ZipArchiveOutputStream)) { return new ZipArchiveOutputStream(options); @@ -106338,29 +112412,29 @@ var require_fast_fifo = __commonJS({ this.head.clear(); this.length = 0; } - push(val2) { + push(val) { this.length++; - if (!this.head.push(val2)) { + if (!this.head.push(val)) { const prev = this.head; this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length); - this.head.push(val2); + this.head.push(val); } } shift() { if (this.length !== 0) this.length--; - const val2 = this.tail.shift(); - if (val2 === void 0 && this.tail.next) { + const val = this.tail.shift(); + if (val === void 0 && this.tail.next) { const next = this.tail.next; this.tail.next = null; this.tail = next; return this.tail.shift(); } - return val2; + return val; } peek() { - const val2 = this.tail.peek(); - if (val2 === void 0 && this.tail.next) return this.tail.next.peek(); - return val2; + const val = this.tail.peek(); + if (val === void 0 && this.tail.next) return this.tail.next.peek(); + return val; } isEmpty() { return this.length === 0; @@ -107838,10 +113912,10 @@ var require_headers2 = __commonJS({ for (let j = 156; j < 512; j++) sum += block[j]; return sum; } - function encodeOct(val2, n) { - val2 = val2.toString(8); - if (val2.length > n) return SEVENS.slice(0, n) + " "; - return ZEROS.slice(0, n - val2.length) + val2 + " "; + function encodeOct(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + return ZEROS.slice(0, n - val.length) + val + " "; } function encodeSizeBin(num, buf, off) { buf[off] = 128; @@ -107876,21 +113950,21 @@ var require_headers2 = __commonJS({ } return positive ? sum : -1 * sum; } - function decodeOct(val2, offset, length) { - val2 = val2.subarray(offset, offset + length); + function decodeOct(val, offset, length) { + val = val.subarray(offset, offset + length); offset = 0; - if (val2[offset] & 128) { - return parse256(val2); + if (val[offset] & 128) { + return parse256(val); } else { - while (offset < val2.length && val2[offset] === 32) offset++; - const end = clamp(indexOf(val2, 32, offset, val2.length), val2.length, val2.length); - while (offset < end && val2[offset] === 0) offset++; + while (offset < val.length && val[offset] === 32) offset++; + const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; if (end === offset) return 0; - return parseInt(b4a.toString(val2.subarray(offset, end)), 8); + return parseInt(b4a.toString(val.subarray(offset, end)), 8); } } - function decodeStr(val2, offset, length, encoding) { - return b4a.toString(val2.subarray(offset, indexOf(val2, 0, offset, offset + length)), encoding); + function decodeStr(val, offset, length, encoding) { + return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding); } function addLength(str2) { const len = b4a.byteLength(str2); @@ -108236,7 +114310,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants10 = __commonJS({ +var require_constants14 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -108260,7 +114334,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants10(); + var constants = require_constants14(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -108576,7 +114650,7 @@ var require_tar2 = __commonJS({ }); // node_modules/buffer-crc32/dist/index.cjs -var require_dist8 = __commonJS({ +var require_dist5 = __commonJS({ "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) { "use strict"; function getDefaultExportFromCjs(x) { @@ -108888,7 +114962,7 @@ var require_json = __commonJS({ "node_modules/archiver/lib/plugins/json.js"(exports2, module2) { var inherits = require("util").inherits; var Transform = require_ours().Transform; - var crc32 = require_dist8(); + var crc32 = require_dist5(); var util = require_archiver_utils(); var Json = function(options) { if (!(this instanceof Json)) { @@ -108940,7 +115014,7 @@ var require_json = __commonJS({ // node_modules/archiver/index.js var require_archiver = __commonJS({ "node_modules/archiver/index.js"(exports2, module2) { - var Archiver = require_core2(); + var Archiver = require_core4(); var formats = {}; var vending = function(format, options) { return vending.create(format, options); @@ -108984,7 +115058,7 @@ var require_archiver = __commonJS({ var require_zip2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108997,31 +115071,31 @@ var require_zip2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -109051,10 +115125,10 @@ var require_zip2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; exports2.createZipUploadStream = createZipUploadStream; - var stream = __importStar4(require("stream")); + var stream = __importStar2(require("stream")); var promises_1 = require("fs/promises"); - var archiver2 = __importStar4(require_archiver()); - var core14 = __importStar4(require_core()); + var archiver2 = __importStar2(require_archiver()); + var core14 = __importStar2(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -109070,7 +115144,7 @@ var require_zip2 = __commonJS({ }; exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification_1) { - return __awaiter4(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { + return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), @@ -109129,7 +115203,7 @@ var require_zip2 = __commonJS({ var require_upload_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109142,31 +115216,31 @@ var require_upload_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -109195,18 +115269,18 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = uploadArtifact; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var upload_zip_specification_1 = require_upload_zip_specification(); - var util_1 = require_util11(); + var util_1 = require_util10(); var blob_upload_1 = require_blob_upload(); var zip_1 = require_zip2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, path_and_artifact_name_validation_1.validateArtifactName)(name); (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory); const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory); @@ -110178,18 +116252,18 @@ var require_binary = __commonJS({ return acc; } function decodeBEs(bytes) { - var val2 = decodeBEu(bytes); + var val = decodeBEu(bytes); if ((bytes[0] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function decodeLEs(bytes) { - var val2 = decodeLEu(bytes); + var val = decodeLEu(bytes); if ((bytes[bytes.length - 1] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function words(decode) { var self2 = {}; @@ -111138,7 +117212,7 @@ var require_unzip = __commonJS({ var require_download_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/download/download-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111151,31 +117225,31 @@ var require_download_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -111202,25 +117276,25 @@ var require_download_artifact = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.streamExtractExternal = streamExtractExternal; exports2.downloadArtifactPublic = downloadArtifactPublic; exports2.downloadArtifactInternal = downloadArtifactInternal; - var promises_1 = __importDefault4(require("fs/promises")); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); - var github2 = __importStar4(require_github()); - var core14 = __importStar4(require_core()); - var httpClient = __importStar4(require_lib7()); - var unzip_stream_1 = __importDefault4(require_unzip()); + var promises_1 = __importDefault2(require("fs/promises")); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); + var github2 = __importStar2(require_github()); + var core14 = __importStar2(require_core()); + var httpClient = __importStar2(require_lib()); + var unzip_stream_1 = __importDefault2(require_unzip()); var user_agent_1 = require_user_agent2(); var config_1 = require_config2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); - var util_1 = require_util11(); + var util_1 = require_util10(); var errors_1 = require_errors3(); var scrubQueryParameters = (url) => { const parsed = new URL(url); @@ -111228,7 +117302,7 @@ var require_download_artifact = __commonJS({ return parsed.toString(); }; function exists(path6) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { yield promises_1.default.access(path6); return true; @@ -111242,7 +117316,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtract(url, directory) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { @@ -111257,7 +117331,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtractExternal(url_1, directory_1) { - return __awaiter4(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { + return __awaiter2(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); const response = yield client.get(url); if (response.message.statusCode !== 200) { @@ -111271,7 +117345,7 @@ var require_download_artifact = __commonJS({ reject(timeoutError); }; const timer = setTimeout(timerFn, opts.timeout); - const hashStream = crypto.createHash("sha256").setEncoding("hex"); + const hashStream = crypto2.createHash("sha256").setEncoding("hex"); const passThrough = new stream.PassThrough(); response.message.pipe(passThrough); passThrough.pipe(hashStream); @@ -111297,7 +117371,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; @@ -111337,7 +117411,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactInternal(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); let digestMismatch = false; @@ -111380,7 +117454,7 @@ Are you trying to download from a different run? Try specifying a github-token w }); } function resolveOrCreateDirectory() { - return __awaiter4(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { + return __awaiter2(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { if (!(yield exists(downloadPath))) { core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); @@ -111397,7 +117471,7 @@ Are you trying to download from a different run? Try specifying a github-token w var require_retry_options = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/retry-options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111410,33 +117484,33 @@ var require_retry_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = getRetryOptions; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -111549,7 +117623,7 @@ var require_dist_node17 = __commonJS({ var require_get_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/get-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111562,31 +117636,31 @@ var require_get_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -111618,17 +117692,17 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = getArtifactInternal; var github_1 = require_github(); var plugin_retry_1 = require_dist_node17(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var utils_1 = require_utils4(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node16(); - var util_1 = require_util11(); + var util_1 = require_util10(); var user_agent_1 = require_user_agent2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -111670,7 +117744,7 @@ var require_get_artifact = __commonJS({ }); } function getArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); @@ -111708,7 +117782,7 @@ var require_get_artifact = __commonJS({ var require_delete_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/delete/delete-artifact.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -111746,12 +117820,12 @@ var require_delete_artifact = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var generated_1 = require_generated(); var get_artifact_1 = require_get_artifact(); var errors_1 = require_errors3(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -111777,7 +117851,7 @@ var require_delete_artifact = __commonJS({ }); } function deleteArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const listReq = { @@ -111813,7 +117887,7 @@ var require_delete_artifact = __commonJS({ var require_list_artifacts = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/list-artifacts.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -111851,14 +117925,14 @@ var require_list_artifacts = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var config_1 = require_config2(); var generated_1 = require_generated(); var maximumArtifactCount = (0, config_1.getMaxArtifactListCount)(); var paginationCount = 100; var maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount); function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) { - return __awaiter4(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { + return __awaiter2(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { (0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); let artifacts = []; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); @@ -111923,7 +117997,7 @@ var require_list_artifacts = __commonJS({ }); } function listArtifactsInternal() { - return __awaiter4(this, arguments, void 0, function* (latest = false) { + return __awaiter2(this, arguments, void 0, function* (latest = false) { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const req = { @@ -111969,7 +118043,7 @@ var require_list_artifacts = __commonJS({ var require_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -111996,7 +118070,7 @@ var require_client2 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __rest4 = exports2 && exports2.__rest || function(s, e) { + var __rest2 = exports2 && exports2.__rest || function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -112019,7 +118093,7 @@ var require_client2 = __commonJS({ var errors_1 = require_errors3(); var DefaultArtifactClient2 = class { uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112036,13 +118110,13 @@ If the error persists, please check whether Actions is operating normally at [ht }); } downloadArtifact(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); } if (options === null || options === void 0 ? void 0 : options.findBy) { - const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest4(options, ["findBy"]); + const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest2(options, ["findBy"]); return (0, download_artifact_1.downloadArtifactPublic)(artifactId, repositoryOwner, repositoryName, token, downloadOptions); } return (0, download_artifact_1.downloadArtifactInternal)(artifactId, options); @@ -112057,7 +118131,7 @@ If the error persists, please check whether Actions and API requests are operati }); } listArtifacts(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112078,7 +118152,7 @@ If the error persists, please check whether Actions and API requests are operati }); } getArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112099,7 +118173,7 @@ If the error persists, please check whether Actions and API requests are operati }); } deleteArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112136,7 +118210,7 @@ var require_interfaces2 = __commonJS({ var require_artifact2 = __commonJS({ "node_modules/@actions/artifact/lib/artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112149,26 +118223,2815 @@ var require_artifact2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var client_1 = require_client2(); - __exportStar4(require_interfaces2(), exports2); - __exportStar4(require_errors3(), exports2); - __exportStar4(require_client2(), exports2); + __exportStar2(require_interfaces2(), exports2); + __exportStar2(require_errors3(), exports2); + __exportStar2(require_client2(), exports2); var client = new client_1.DefaultArtifactClient(); exports2.default = client; } }); +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js +var require_utils10 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js +var require_command4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js +var require_file_command4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs7.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs7.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js +var require_proxy5 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js +var require_lib7 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy5()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve5(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve5(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve5(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve5(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve5(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js +var require_auth4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib7(); + var auth_1 = require_auth4(); + var core_1 = require_core5(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js +var require_summary4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js +var require_path_utils4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path6 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path6.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar2(require("fs")); + var path6 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path6 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path6 = __importStar2(require("path")); + var io6 = __importStar2(require_io4()); + var ioUtil = __importStar2(require_io_util4()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path6.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve5(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js +var require_exec4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner4()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js +var require_platform4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec4()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js +var require_core5 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command4(); + var file_command_1 = require_file_command4(); + var utils_1 = require_utils10(); + var os = __importStar2(require("os")); + var path6 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils4(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path6.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary4(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary4(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils4(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform4()); + } +}); + // node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js var require_path_and_artifact_name_validation2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.checkArtifactFilePath = exports2.checkArtifactName = void 0; - var core_1 = require_core(); + var core_1 = require_core5(); var invalidArtifactFilePathCharacters = /* @__PURE__ */ new Map([ ['"', ' Double quote "'], [":", " Colon :"], @@ -112224,7 +121087,7 @@ The following characters are not allowed in files that are uploaded due to limit var require_upload_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112237,24 +121100,24 @@ var require_upload_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs7 = __importStar4(require("fs")); - var core_1 = require_core(); + var fs7 = __importStar2(require("fs")); + var core_1 = require_core5(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { @@ -112299,7 +121162,7 @@ var require_tmp = __commonJS({ var fs7 = require("fs"); var os = require("os"); var path6 = require("path"); - var crypto = require("crypto"); + var crypto2 = require("crypto"); var _c = { fs: fs7.constants, os: os.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; @@ -112479,9 +121342,9 @@ var require_tmp = __commonJS({ function _randomChars(howMany) { let value = [], rnd = null; try { - rnd = crypto.randomBytes(howMany); + rnd = crypto2.randomBytes(howMany); } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); + rnd = crypto2.pseudoRandomBytes(howMany); } for (let i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); @@ -112696,811 +121559,6 @@ var require_tmp_promise = __commonJS({ } }); -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js -var require_proxy7 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js -var require_lib9 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy7()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js -var require_auth4 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact-legacy/lib/internal/config-variables.js var require_config_variables = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/config-variables.js"(exports2) { @@ -113873,10 +121931,10 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils7 = __commonJS({ +var require_utils11 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -113903,18 +121961,18 @@ var require_utils7 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.digestForStream = exports2.sleep = exports2.getProperRetention = exports2.rmFile = exports2.getFileSize = exports2.createEmptyFilesForArtifact = exports2.createDirectoriesForArtifact = exports2.displayHttpDiagnostics = exports2.getArtifactUrl = exports2.createHttpClient = exports2.getUploadHeaders = exports2.getDownloadHeaders = exports2.getContentRange = exports2.tryGetRetryAfterValueTimeInMilliseconds = exports2.isThrottledStatusCode = exports2.isRetryableStatusCode = exports2.isForbiddenStatusCode = exports2.isSuccessStatusCode = exports2.getApiVersion = exports2.parseEnvNumber = exports2.getExponentialRetryTimeInMilliseconds = void 0; - var crypto_1 = __importDefault4(require("crypto")); + var crypto_1 = __importDefault2(require("crypto")); var fs_1 = require("fs"); - var core_1 = require_core(); - var http_client_1 = require_lib9(); + var core_1 = require_core5(); + var http_client_1 = require_lib7(); var auth_1 = require_auth4(); var config_variables_1 = require_config_variables(); - var crc64_1 = __importDefault4(require_crc64()); + var crc64_1 = __importDefault2(require_crc64()); function getExponentialRetryTimeInMilliseconds(retryCount) { if (retryCount < 0) { throw new Error("RetryCount should not be negative"); @@ -114060,7 +122118,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.displayHttpDiagnostics = displayHttpDiagnostics; function createDirectoriesForArtifact(directories) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const directory of directories) { yield fs_1.promises.mkdir(directory, { recursive: true @@ -114070,7 +122128,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createDirectoriesForArtifact = createDirectoriesForArtifact; function createEmptyFilesForArtifact(emptyFilesToCreate) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const filePath of emptyFilesToCreate) { yield (yield fs_1.promises.open(filePath, "w")).close(); } @@ -114078,7 +122136,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createEmptyFilesForArtifact = createEmptyFilesForArtifact; function getFileSize(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const stats = yield fs_1.promises.stat(filePath); (0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`); return stats.size; @@ -114086,7 +122144,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getFileSize = getFileSize; function rmFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield fs_1.promises.unlink(filePath); }); } @@ -114107,13 +122165,13 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getProperRetention = getProperRetention; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { const crc64 = new crc64_1.default(); const md5 = crypto_1.default.createHash("md5"); @@ -114137,7 +122195,7 @@ var require_status_reporter = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StatusReporter = void 0; - var core_1 = require_core(); + var core_1 = require_core5(); var StatusReporter = class { constructor(displayFrequencyInMilliseconds) { this.totalNumberOfFilesToProcess = 0; @@ -114183,7 +122241,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils7(); + var utils_1 = require_utils11(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -114215,7 +122273,7 @@ var require_http_manager = __commonJS({ var require_upload_gzip = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-gzip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114228,21 +122286,21 @@ var require_upload_gzip = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -114269,7 +122327,7 @@ var require_upload_gzip = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -114290,8 +122348,8 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs7 = __importStar4(require("fs")); - var zlib = __importStar4(require("zlib")); + var fs7 = __importStar2(require("fs")); + var zlib = __importStar2(require("zlib")); var util_1 = require("util"); var stat = (0, util_1.promisify)(fs7.stat); var gzipExemptFileExtensions = [ @@ -114319,7 +122377,7 @@ var require_upload_gzip = __commonJS({ // 7ZIP ]; function createGZipFileOnDisk(originalFilePath, tempFilePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const gzipExemptExtension of gzipExemptFileExtensions) { if (originalFilePath.endsWith(gzipExemptExtension)) { return Number.MAX_SAFE_INTEGER; @@ -114330,7 +122388,7 @@ var require_upload_gzip = __commonJS({ const gzip = zlib.createGzip(); const outputStream = fs7.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); - outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { + outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; resolve5(size); })); @@ -114343,15 +122401,15 @@ var require_upload_gzip = __commonJS({ } exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; const inputStream = fs7.createReadStream(originalFilePath); const gzip = zlib.createGzip(); inputStream.pipe(gzip); const chunks = []; try { - for (var _d = true, gzip_1 = __asyncValues4(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { + for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { _c = gzip_1_1.value; _d = false; try { @@ -114382,7 +122440,7 @@ var require_upload_gzip = __commonJS({ var require_requestUtils2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114395,21 +122453,21 @@ var require_requestUtils2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -114438,11 +122496,11 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils7(); - var core14 = __importStar4(require_core()); + var utils_1 = require_utils11(); + var core14 = __importStar2(require_core5()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let response = void 0; let statusCode = void 0; let isRetryable = false; @@ -114487,7 +122545,7 @@ var require_requestUtils2 = __commonJS({ } exports2.retry = retry3; function retryHttpClientRequest(name, method, customErrorMessages = /* @__PURE__ */ new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield retry3(name, method, customErrorMessages, maxAttempts); }); } @@ -114499,7 +122557,7 @@ var require_requestUtils2 = __commonJS({ var require_upload_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114512,21 +122570,21 @@ var require_upload_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -114555,17 +122613,17 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs7 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var tmp = __importStar4(require_tmp_promise()); - var stream = __importStar4(require("stream")); - var utils_1 = require_utils7(); + var fs7 = __importStar2(require("fs")); + var core14 = __importStar2(require_core5()); + var tmp = __importStar2(require_tmp_promise()); + var stream = __importStar2(require("stream")); + var utils_1 = require_utils11(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); var perf_hooks_1 = require("perf_hooks"); var status_reporter_1 = require_status_reporter(); - var http_client_1 = require_lib9(); + var http_client_1 = require_lib7(); var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils2(); @@ -114581,7 +122639,7 @@ var require_upload_http_client = __commonJS({ * @returns The response from the Artifact Service if the file container was successfully created */ createArtifactInFileContainer(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const parameters = { Type: "actions_storage", Name: artifactName @@ -114604,7 +122662,7 @@ var require_upload_http_client = __commonJS({ `The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter2(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages); const body = yield response.readBody(); @@ -114618,7 +122676,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of all the files uploaded in bytes */ uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); @@ -114648,7 +122706,7 @@ var require_upload_http_client = __commonJS({ let abortPendingFileUploads = false; this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length); this.statusReporter.start(); - yield Promise.all(parallelUploads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < filesToUpload.length) { const currentFileParameters = parameters[currentFile]; currentFile += 1; @@ -114691,7 +122749,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of the file that was uploaded in bytes along with any failed uploads */ uploadFileAsync(httpClientIndex, parameters) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileStat = yield stat(parameters.file); const totalFileSize = fileStat.size; const isFIFO = fileStat.isFIFO(); @@ -114792,10 +122850,10 @@ var require_upload_http_client = __commonJS({ * @returns if the chunk was successfully uploaded */ uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const digest = yield (0, utils_1.digestForStream)(openStream()); const headers = (0, utils_1.getUploadHeaders)("application/octet-stream", true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest); - const uploadChunkRequest = () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.uploadHttpManager.getClient(httpClientIndex); return yield client.sendStream("PUT", resourceUrl, openStream(), headers); }); @@ -114812,7 +122870,7 @@ var require_upload_http_client = __commonJS({ } return false; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); @@ -114861,7 +122919,7 @@ var require_upload_http_client = __commonJS({ * Updating the size indicates that we are done uploading all the contents of the artifact */ patchArtifactSize(size, artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)()); resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; @@ -114875,7 +122933,7 @@ var require_upload_http_client = __commonJS({ `An Artifact with the name ${artifactName} was not found` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter2(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); @@ -114891,7 +122949,7 @@ var require_upload_http_client = __commonJS({ var require_download_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114904,21 +122962,21 @@ var require_download_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -114947,10 +123005,10 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs7 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils7(); + var fs7 = __importStar2(require("fs")); + var core14 = __importStar2(require_core5()); + var zlib = __importStar2(require("zlib")); + var utils_1 = require_utils11(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -114966,11 +123024,11 @@ var require_download_http_client = __commonJS({ * Gets a list of all artifacts that are in a specific container */ listArtifacts() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactUrl = (0, utils_1.getArtifactUrl)(); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter2(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); })); const body = yield response.readBody(); @@ -114983,12 +123041,12 @@ var require_download_http_client = __commonJS({ * @param containerUrl the artifact container URL for the run */ getContainerItems(artifactName, containerUrl) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL(containerUrl); resourceUrl.searchParams.append("itemPath", artifactName); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter2(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); })); const body = yield response.readBody(); @@ -115000,7 +123058,7 @@ var require_download_http_client = __commonJS({ * @param downloadItems information about what items to download and where to save them */ downloadSingleArtifact(downloadItems) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; @@ -115009,7 +123067,7 @@ var require_download_http_client = __commonJS({ core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); - yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelDownloads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < downloadItems.length) { const currentFileToDownload = downloadItems[currentFile]; currentFile += 1; @@ -115035,19 +123093,19 @@ var require_download_http_client = __commonJS({ * @param downloadPath destination location for the file being downloaded */ downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); let destinationStream = fs7.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); - const makeDownloadRequest = () => __awaiter4(this, void 0, void 0, function* () { + const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); return yield client.get(artifactLocation, headers); }); const isGzip = (incomingHeaders) => { return "content-encoding" in incomingHeaders && incomingHeaders["content-encoding"] === "gzip"; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { retryCount++; if (retryCount > retryLimit) { return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${artifactLocation}`)); @@ -115071,7 +123129,7 @@ var require_download_http_client = __commonJS({ } return parseInt(expected) === received; }; - const resetDestinationStream = (fileDownloadPath) => __awaiter4(this, void 0, void 0, function* () { + const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); yield new Promise((resolve5) => { destinationStream.on("close", resolve5); @@ -115124,7 +123182,7 @@ var require_download_http_client = __commonJS({ * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it */ pipeResponseToFile(response, destinationStream, isGzip) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield new Promise((resolve5, reject) => { if (isGzip) { const gunzip = zlib.createGunzip(); @@ -115168,7 +123226,7 @@ var require_download_http_client = __commonJS({ var require_download_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -115181,23 +123239,23 @@ var require_download_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path6 = __importStar4(require("path")); + var path6 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { @@ -115234,7 +123292,7 @@ var require_download_specification = __commonJS({ var require_artifact_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/artifact-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -115247,21 +123305,21 @@ var require_artifact_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -115290,10 +123348,10 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core5()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils7(); + var utils_1 = require_utils11(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -115310,7 +123368,7 @@ var require_artifact_client = __commonJS({ * Uploads an artifact */ uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); @@ -115354,7 +123412,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadArtifact(name, path6, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { @@ -115388,7 +123446,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadAllArtifacts(path6) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); @@ -115442,1103 +123500,6 @@ var require_artifact_client2 = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core14.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; - } - exports2.getOptions = getOptions; - } -}); - -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path6 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname2(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path6.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname2; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path6.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path6.sep)) { - return p; - } - if (p === path6.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; - } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; - } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path6 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path6.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path6.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path6.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } - } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path6.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path6.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path6 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path6.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path6.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path6.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path6.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path6.sep}`)) { - homedir = homedir || os.homedir(); - (0, assert_1.default)(homedir, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = _Pattern.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path6, level) { - this.path = path6; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path6 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs7.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path6.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs7.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs7.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs7.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path6 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path6.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs7.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto.createHash("sha256"); - const pipeline = util.promisify(stream.pipeline); - yield pipeline(fs7.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create3; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create3(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - // src/analyze-action-post.ts var fs6 = __toESM(require("fs")); var core13 = __toESM(require_core()); @@ -116548,12 +123509,12 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -119756,12 +126717,12 @@ var semver4 = __toESM(require_semver2()); // src/overlay-database-utils.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -120215,7 +127176,7 @@ var featureConfig = { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -120295,13 +127256,13 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); @@ -120890,15 +127851,15 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/autobuild.ts var core11 = __toESM(require_core()); // src/dependency-caching.ts var import_path = require("path"); -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob()); function getJavaTempDependencyDir() { return (0, import_path.join)(getTemporaryDirectory(), "codeql_java", "repository"); } diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 4de550f5d..bf0dfdabb 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os5 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os5 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os5.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto2 = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var os5 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto3 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); + supportedHashes = crypto3.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto2 === void 0) { + if (crypto3 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto2 = require("node:crypto"); - random = (max) => crypto2.randomInt(0, max); + const crypto3 = require("node:crypto"); + random = (max) => crypto3.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve8({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto2.randomBytes(16).toString("base64"); + const keyValue = crypto3.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto3.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto2.randomBytes(4); + this.maskKey = crypto3.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path16 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path16 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path16.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs17 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs17.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs17.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path16.dirname(filePath); const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path16.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which7; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os5 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path16 = __importStar4(require("path")); - var io7 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable8; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning10; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable8(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable8; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os5.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput2; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning10(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning10; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os5.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs17.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which7; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os5 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os5.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto3 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs17.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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(url2, base) { + super(url2, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve8(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve8(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve8(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve8(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path16 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path16.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os5.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os5.EOL.length); + n = s.indexOf(os5.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os5.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable8; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os5.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os5.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core15 = __importStar4(require_core()); + var core15 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core15.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core15.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core15.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core15.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path16 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path16.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path16 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path16.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir2) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { homedir2 = homedir2 || os5.homedir(); - assert_1.default(homedir2, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); + (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core15 = __importStar2(require_core2()); + var fs17 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path16 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core15.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await2(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve8, reject) { + v = o[n](v), settle(resolve8, reject, v.done, v.value); + }); + }; + } + function settle(resolve8, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve8({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto3 = __importStar2(require("crypto")); + var core15 = __importStar2(require_core2()); + var fs17 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path16 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core15.info : core15.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto3.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs17.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash2 = crypto3.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs17.createReadStream(file), hash2); + result.write(hash2.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create2(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create2; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create2(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core15 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io3()); - var crypto2 = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core15 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob()); + var io7 = __importStar2(require_io()); + var crypto3 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path16.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto2.randomUUID()); + const dest = path16.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs17.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs17.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core15.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core15.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io7.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto3.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os5 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os5.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve8, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve8(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve8) => { - token = setTimeout(resolve8, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url2 = new URL(value); - if (!url2.search) { - return value; - } - for (const [key] of url2.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url2.searchParams.set(key, RedactedString); - } - } - return url2.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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 url2 = new URL(locationHeader, request.url); - request.url = url2.toString(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path16, preserveJsx) { + if (typeof path16 === "string" && /^\.\.?\//.test(path16)) { + return path16.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path16; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os5 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os5.arch()}-${os5.type()}-${os5.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve8, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve8(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url2 = new URL(value); + if (!url2.search) { + return value; + } + for (const [key] of url2.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url2.searchParams.set(key, RedactedString); + } + } + return url2.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve8) => { + const handler = () => { + resolve8(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + 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 = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve8, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve8) : node_https_1.default.request(options, resolve8); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve8, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve8(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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 url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve8, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve8(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve8, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url2 = new URL(req.url); + if (!url2.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url2.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url2 = new URL(request.url); + if (url2.hostname === "localhost" || url2.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning10 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning10); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning10); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url2, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url2, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url: url2, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url2 = new URL(requestUrl); + return url2.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url2, options = {}) { + if (!options.queryParameters) { + return url2; + } + const parsedUrl = new URL(url2); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path16, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path16, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve8, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve8(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve8) => { + token = setTimeout(resolve8, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib2 = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve8) => { - const handler = () => { - resolve8(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - 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: url2.hostname, - path: `${url2.pathname}${url2.search}`, - port: url2.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve8, reject) => { - const req = isInsecure ? http.request(options, resolve8) : https2.request(options, resolve8); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib2.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib2.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve8, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve8(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber2(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber2; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber2 = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber2(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve8, reject) => { - this.resolve = resolve8; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve8) => setTimeout(() => resolve8(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto2 = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs17 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url3) { - const urlParsed = new URL(url3); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); let path16 = urlParsed.pathname; path16 = path16 || "/"; path16 = escape(path16); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url3, name) { - const urlParsed = new URL(url3); + function appendToURLPath(url2, name) { + const urlParsed = new URL(url2); let path16 = urlParsed.pathname; path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; urlParsed.pathname = path16; return urlParsed.toString(); } - function setURLParameter(url3, name, value) { - const urlParsed = new URL(url3); + function setURLParameter(url2, name, value) { + const urlParsed = new URL(url2); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url3, name) { - var _a; - const urlParsed = new URL(url3); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url3, host) { - const urlParsed = new URL(url3); + function setURLHost(url2, host) { + const urlParsed = new URL(url2); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url3) { + function getURLPath(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url3) { + function getURLScheme(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url3) { - const urlParsed = new URL(url3); + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url3) { - let queryString = new URL(url3).search; + function getURLQueries(url2) { + let queryString = new URL(url2).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url3, queryParts) { - const urlParsed = new URL(url3); + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url3) { - const parsedUrl = new URL(url3); + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path16}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto2.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve8, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve8).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve8(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); + let path16 = urlParsed.pathname; + path16 = path16 || "/"; + path16 = escape(path16); + urlParsed.pathname = path16; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + 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); + 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); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url2, host) { + const urlParsed = new URL(url2); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url2) { + let queryString = new URL(url2).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve8, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve8(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto2.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path16}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path16}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url2 = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url2], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url2], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url3, options) { - var _a, _b; - if (url3 === void 0) { + constructor(url2, options) { + if (url2 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url3; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url2; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url3, pipeline) { - this.url = escapeURLPath(url3); - this.accountName = getAccountNameFromUrl(url3); + constructor(url2, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url2); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url2); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto2.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve8, reject) => { + this.resolve = resolve8; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve8) => setTimeout(() => resolve8(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString3, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve8, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve8).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve8(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve8, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve8(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve8(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve8, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve8(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve8, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve8, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url3; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + let url2; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve8) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve8(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve8) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve8(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url3; + let url2; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url3 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url2 = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url3; + let url2; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url3 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url2 = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path16 = getURLPath(subRequest.url); + const path16 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path16 || path16 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url3, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url3); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path16 = (0, utils_common_js_1.getURLPath)(url2); if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url3, pipeline); + super(url2, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve8) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve8(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve8) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url3, credentialOrPipeline, options) { + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url3, pipeline); + super(url2, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core15 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core15 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core15 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core15 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core15 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs17 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core15 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs17 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs17.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve8) => { timeoutHandle = setTimeout(() => resolve8("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core15 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core15 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core15.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core15.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core15 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs17 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core15 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs17 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core15.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs17.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core15.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url2) { if (!url2) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url2} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { 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* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io7 = __importStar4(require_io3()); + var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path16 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path16 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io7.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core15 = __importStar4(require_core()); - var path16 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core15 = __importStar2(require_core()); + var path16 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core15.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core15.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core15.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os5 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os5.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os5 = require("os"); - var cp = require("child_process"); - var fs17 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os5.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto3 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs17.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os5.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs17.existsSync(lsbReleaseFile)) { - contents = fs17.readFileSync(lsbReleaseFile).toString(); - } else if (fs17.existsSync(osReleaseFile)) { - contents = fs17.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path16 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path16.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os5.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os5.EOL.length); + n = s.indexOf(os5.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os5.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable8; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os5.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os5.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os5 = require("os"); + var cp = require("child_process"); + var fs17 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os5.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os5.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs17.existsSync(lsbReleaseFile)) { + contents = fs17.readFileSync(lsbReleaseFile).toString(); + } else if (fs17.existsSync(osReleaseFile)) { + contents = fs17.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core15 = __importStar4(require_core()); + var core15 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core15 = __importStar4(require_core()); - var io7 = __importStar4(require_io4()); - var crypto2 = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core15 = __importStar2(require_core3()); + var io7 = __importStar2(require_io3()); + var crypto3 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path16.join(_getTempDirectory(), crypto2.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path16.join(_getTempDirectory(), crypto3.randomUUID()); yield io7.mkdirP(path16.dirname(dest)); core15.debug(`Downloading ${url2}`); core15.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io7.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; if (!core15.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os5.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path16.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80318,1103 +87198,6 @@ var require_follow_redirects = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core15 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core15.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core15.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core15.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core15.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core15.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; - } - exports2.getOptions = getOptions; - } -}); - -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname3(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path16.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname3; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path16.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { - return p; - } - if (p === path16.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; - } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; - } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path16.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path16.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } - } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path16.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir2) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir2); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir2) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { - homedir2 = homedir2 || os5.homedir(); - (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); - pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path16, level) { - this.path = path16; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core15.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs17.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs17.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core15.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs17.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core15.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto2 = __importStar4(require("crypto")); - var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path16 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core15.info : core15.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto2.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs17.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash2 = crypto2.createHash("sha256"); - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs17.createReadStream(file), hash2); - result.write(hash2.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create2(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create2; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create2(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - // src/sarif-schema-2.1.0.json var require_sarif_schema_2_1_0 = __commonJS({ "src/sarif-schema-2.1.0.json"(exports2, module2) { @@ -84328,7 +90111,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); @@ -84336,7 +90119,7 @@ var fsPromises = __toESM(require("fs/promises")); var os = __toESM(require("os")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -87466,7 +93249,7 @@ async function asyncSome(array, predicate) { } function unsafeEntriesInvariant(object) { return Object.entries(object).filter( - ([_, val2]) => val2 !== void 0 + ([_, val]) => val !== void 0 ); } @@ -87720,7 +93503,7 @@ var SarifScanOrder = [CodeQuality, CodeScanning]; var fs12 = __toESM(require("fs")); var path12 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -88174,7 +93957,7 @@ var fs6 = __toESM(require("fs")); var path6 = __toESM(require("path")); // src/caching-utils.ts -var crypto = __toESM(require("crypto")); +var crypto2 = __toESM(require("crypto")); var core6 = __toESM(require_core()); async function getTotalCacheSize(paths, logger, quiet = false) { const sizes = await Promise.all( @@ -88188,7 +93971,7 @@ function shouldStoreCache(kind) { var cacheKeyHashLength = 16; function createCacheKeyHash(components) { const componentsJson = JSON.stringify(components); - return crypto.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength); + return crypto2.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength); } // src/config/db-config.ts @@ -88217,12 +94000,12 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -89274,7 +95057,7 @@ function getDiffRanges(fileDiff, logger) { } // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; var MINIMUM_CACHE_MB_TO_UPLOAD = 10; @@ -89544,7 +95327,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -89703,7 +95486,7 @@ var os2 = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); @@ -91101,8 +96884,8 @@ async function runAutobuild(config, language, logger) { // src/dependency-caching.ts var os3 = __toESM(require("os")); var import_path = require("path"); -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob2()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; function getJavaTempDependencyDir() { @@ -92417,13 +98200,13 @@ function fromString(str2, unsigned, radix) { return result; } Long.fromString = fromString; -function fromValue(val2, unsigned) { - if (typeof val2 === "number") return fromNumber(val2, unsigned); - if (typeof val2 === "string") return fromString(val2, unsigned); +function fromValue(val, unsigned) { + if (typeof val === "number") return fromNumber(val, unsigned); + if (typeof val === "string") return fromString(val, unsigned); return fromBits( - val2.low, - val2.high, - typeof unsigned === "boolean" ? unsigned : val2.unsigned + val.low, + val.high, + typeof unsigned === "boolean" ? unsigned : val.unsigned ); } Long.fromValue = fromValue; @@ -92495,8 +98278,8 @@ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val2 = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) if ((val2 & 1 << bit) != 0) break; + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; LongPrototype.isSafeInteger = function isSafeInteger() { @@ -93116,7 +98899,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io6 = __toESM(require_io2()); +var io6 = __toESM(require_io()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index dc7d0de52..0698fd692 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os2 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var os2 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve5({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path7 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path7 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path7.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path7 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs7 = __importStar2(require("fs")); + var path7 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs7.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs7.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path7.dirname(filePath); const upperName = path7.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path7.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which5; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path7 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path7 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which5; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os2 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path7 = __importStar4(require("path")); - var io5 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path7 = __importStar2(require("path")); + var io5 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner5 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io5.which(this.toolPath, true); - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable7; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os2 = __importStar4(require("os")); - var path7 = __importStar4(require("path")); + var os2 = __importStar2(require("os")); + var path7 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable7(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable7(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable7; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path7.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os2.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs7 = __importStar4(require("fs")); - var path7 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs7.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path7.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which5; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path7 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path7.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path7.join(dest, path7.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path7.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path7.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs7.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs7.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve5(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve5(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve5(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve5(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve5(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path7 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path7.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar2(require("fs")); + var path7 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path7.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path7.dirname(filePath); + const upperName = path7.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path7.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path7 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path7.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path7.join(dest, path7.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path7.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path7.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path7.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path7 = __importStar2(require("path")); + var io5 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io5.which(this.toolPath, true); + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve5(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os2 = __importStar2(require("os")); + var path7 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable7(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable7; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path7.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path7 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path7 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname2; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path7.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path7 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path7 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path7.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path7.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path7.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os2 = __importStar4(require("os")); - var path7 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os2 = __importStar2(require("os")); + var path7 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path7.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path7.sep}`)) { homedir = homedir || os2.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path7 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core2()); + var fs7 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path7 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs7.promises.lstat(searchPath)); + yield __await2(fs7.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path7.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); + }); + }; + } + function settle(resolve5, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve5({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core2()); + var fs7 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path7 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path7.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs7.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs7.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path7 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path7.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path7 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path7.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path7.join(dest, path7.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path7.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which5; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path7.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io5 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var path7 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io5 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var path7 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path7.join(baseLocation, "actions", "temp"); } - const dest = path7.join(tempDirectory, crypto.randomUUID()); + const dest = path7.join(tempDirectory, crypto2.randomUUID()); yield io5.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs7.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs7.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs7.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io5.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os2 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os2.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve5, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve5(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { - token = setTimeout(resolve5, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path7, preserveJsx) { + if (typeof path7 === "string" && /^\.\.?\//.test(path7)) { + return path7.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path7; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os2 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay(delayInMs, value, options) { - return new Promise((resolve5, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve5(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve5) => { + const handler = () => { + resolve5(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve5, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve5) : node_https_1.default.request(options, resolve5); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve5, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve5(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay(delayInMs, value, options) { + return new Promise((resolve5, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve5(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve5, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path7, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path7, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve5, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve5(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { + token = setTimeout(resolve5, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve5) => { - const handler = () => { - resolve5(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve5, reject) => { - const req = isInsecure ? http.request(options, resolve5) : https2.request(options, resolve5); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve5, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve5(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve5, reject) => { - this.resolve = resolve5; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs7 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs7); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path7 = urlParsed.pathname; path7 = path7 || "/"; path7 = escape(path7); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url, name) { + const urlParsed = new URL(url); let path7 = urlParsed.pathname; path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; urlParsed.pathname = path7; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path7 = getURLPath(request.url) || "/"; + const path7 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path7}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve5, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve5).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve5(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path7 = urlParsed.pathname; + path7 = path7 || "/"; + path7 = escape(path7); + urlParsed.pathname = path7; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path7 = urlParsed.pathname; + path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; + urlParsed.pathname = path7; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve5, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve5(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path7 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path7}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path7 = getURLPath(request.url) || "/"; + const path7 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path7}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path7 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path7}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve5, reject) => { + this.resolve = resolve5; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve5, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve5).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve5(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve5, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve5(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve5(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve5, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve5(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve5, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve5(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve5, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve5) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve5(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve5) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve5(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path7 = getURLPath(subRequest.url); + const path7 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path7 || path7 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path7 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path7 = (0, utils_common_js_1.getURLPath)(url); if (path7 && path7 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve5) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve5(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve5) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs7 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs7 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs7.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs7.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve5) => { timeoutHandle = setTimeout(() => resolve5("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs7 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs7 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs7.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io5 = __importStar4(require_io3()); + var io5 = __importStar2(require_io()); var fs_1 = require("fs"); - var path7 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path7 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io5.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path7.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path7 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core14 = __importStar2(require_core()); + var path7 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs7 = __importStar4(require("fs")); - var path7 = __importStar4(require("path")); - _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs7.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path7.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path7 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path7.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path7.join(dest, path7.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path7.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which5; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path7.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os2 = require("os"); - var cp = require("child_process"); - var fs7 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os2.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs7.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs7.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os2.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs7.existsSync(lsbReleaseFile)) { - contents = fs7.readFileSync(lsbReleaseFile).toString(); - } else if (fs7.existsSync(osReleaseFile)) { - contents = fs7.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path7 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path7.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar2(require("fs")); + var path7 = __importStar2(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path7.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path7.dirname(filePath); + const upperName = path7.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path7.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path7 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path7.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path7.join(dest, path7.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path7.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path7.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path7.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path7 = __importStar2(require("path")); + var io5 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io5.which(this.toolPath, true); + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve5(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os2 = __importStar2(require("os")); + var path7 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable7(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable7; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path7.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os2 = require("os"); + var cp = require("child_process"); + var fs7 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os2.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os2.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs7.existsSync(lsbReleaseFile)) { + contents = fs7.readFileSync(lsbReleaseFile).toString(); + } else if (fs7.existsSync(osReleaseFile)) { + contents = fs7.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve5) => setTimeout(resolve5, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve5) { resolve5(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io5 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs7 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os2 = __importStar4(require("os")); - var path7 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core3()); + var io5 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs7 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os2 = __importStar2(require("os")); + var path7 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path7.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path7.join(_getTempDirectory(), crypto2.randomUUID()); yield io5.mkdirP(path7.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs7.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io5.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io5.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os2.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path7.join(_getTempDirectory(), crypto.randomUUID()); + dest = path7.join(_getTempDirectory(), crypto2.randomUUID()); } yield io5.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path7.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve5(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve5(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve5(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve5(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80326,13 +87206,13 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -83707,12 +90587,12 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -84421,7 +91301,7 @@ var GitHubFeatureFlags = class { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -84501,13 +91381,13 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index c1ee30d74..7b91eedc6 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os3 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os3.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var os3 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); + supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve8({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path15 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path15 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path15.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs17 = __importStar2(require("fs")); + var path15 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs17.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs17.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path15.dirname(filePath); const upperName = path15.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path15.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path15 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which7; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os3 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path15 = __importStar4(require("path")); - var io7 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path15 = __importStar2(require("path")); + var io7 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable8; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning12; + exports2.notice = notice; + exports2.info = info7; + exports2.startGroup = startGroup4; + exports2.endGroup = endGroup4; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable8(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable8; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os3.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning12(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning12; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info7(message) { process.stdout.write(message + os3.EOL); } - exports2.info = info7; function startGroup4(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup4; function endGroup4() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup4; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup4(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs17.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path15.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path15.dirname(filePath); - const upperName = path15.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which7; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path15.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path15.join(dest, path15.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path15.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path15.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path15.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs17.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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(url2, base) { + super(url2, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve8(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve8(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve8(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve8(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path15 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path15.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar2(require("fs")); + var path15 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path15 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path15 = __importStar2(require("path")); + var io7 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable8; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning12(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning12; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info7; + function startGroup4(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup4; + function endGroup4() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup4; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup4(name); + let result; + try { + result = yield fn(); + } finally { + endGroup4(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core18.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core18.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core18.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core18.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path15 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path15.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path15 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path15.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { homedir = homedir || os3.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path15 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core18 = __importStar2(require_core2()); + var fs17 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path15 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core18.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await2(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve8, reject) { + v = o[n](v), settle(resolve8, reject, v.done, v.value); + }); + }; + } + function settle(resolve8, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve8({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core18 = __importStar2(require_core2()); + var fs17 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path15 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core18.info : core18.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs17.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash2 = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs17.createReadStream(file), hash2); + result.write(hash2.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create3; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path15.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path15.dirname(filePath); - const upperName = path15.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path15.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path15.join(dest, path15.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path15.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path15.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path15.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create3(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core18 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core18 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob()); + var io7 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var path15 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path15.join(baseLocation, "actions", "temp"); } - const dest = path15.join(tempDirectory, crypto.randomUUID()); + const dest = path15.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs17.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs17.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core18.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core18.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io7.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os3 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os3.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve8, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve8(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve8) => { - token = setTimeout(resolve8, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url2 = new URL(value); - if (!url2.search) { - return value; - } - for (const [key] of url2.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url2.searchParams.set(key, RedactedString); - } - } - return url2.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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 url2 = new URL(locationHeader, request.url); - request.url = url2.toString(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path15, preserveJsx) { + if (typeof path15 === "string" && /^\.\.?\//.test(path15)) { + return path15.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path15; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os3 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os3.arch()}-${os3.type()}-${os3.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve8, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve8(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context3 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context3.logger; + function setLogLevel(logLevel) { + context3.setLogLevel(logLevel); + } + function getLogLevel() { + return context3.getLogLevel(); + } + function createClientLogger(namespace) { + return context3.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url2 = new URL(value); + if (!url2.search) { + return value; + } + for (const [key] of url2.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url2.searchParams.set(key, RedactedString); + } + } + return url2.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve8) => { + const handler = () => { + resolve8(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + 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 = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve8, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve8) : node_https_1.default.request(options, resolve8); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve8, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve8(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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 url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve8, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve8(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve8, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url2 = new URL(req.url); + if (!url2.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url2.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url2 = new URL(request.url); + if (url2.hostname === "localhost" || url2.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning12 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning12); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning12); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url2, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url2, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url: url2, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url2 = new URL(requestUrl); + return url2.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url2, options = {}) { + if (!options.queryParameters) { + return url2; + } + const parsedUrl = new URL(url2); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path15, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path15, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context3 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context3.logger; + function setLogLevel(level) { + context3.setLogLevel(level); + } + function getLogLevel() { + return context3.getLogLevel(); + } + function createClientLogger(namespace) { + return context3.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve8, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve8(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve8) => { + token = setTimeout(resolve8, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context3; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib3 = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve8) => { - const handler = () => { - resolve8(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - 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: url2.hostname, - path: `${url2.pathname}${url2.search}`, - port: url2.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve8, reject) => { - const req = isInsecure ? http.request(options, resolve8) : https2.request(options, resolve8); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib3.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib3.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve8, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve8(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context3 = {}; - for (var p in contextIn) context3[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context3.access[p] = contextIn.access[p]; - context3.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context3 = {}; - for (var p in contextIn) context3[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context3.access[p] = contextIn.access[p]; - context3.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info7; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber2(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber2; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber2 = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber2(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _2 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _2), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve8, reject) => { - this.resolve = resolve8; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve8) => setTimeout(() => resolve8(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs17 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url3) { - const urlParsed = new URL(url3); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); let path15 = urlParsed.pathname; path15 = path15 || "/"; path15 = escape(path15); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url3, name) { - const urlParsed = new URL(url3); + function appendToURLPath(url2, name) { + const urlParsed = new URL(url2); let path15 = urlParsed.pathname; path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; urlParsed.pathname = path15; return urlParsed.toString(); } - function setURLParameter(url3, name, value) { - const urlParsed = new URL(url3); + function setURLParameter(url2, name, value) { + const urlParsed = new URL(url2); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url3, name) { - var _a; - const urlParsed = new URL(url3); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url3, host) { - const urlParsed = new URL(url3); + function setURLHost(url2, host) { + const urlParsed = new URL(url2); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url3) { + function getURLPath(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url3) { + function getURLScheme(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url3) { - const urlParsed = new URL(url3); + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url3) { - let queryString = new URL(url3).search; + function getURLQueries(url2) { + let queryString = new URL(url2).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url3, queryParts) { - const urlParsed = new URL(url3); + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url3) { - const parsedUrl = new URL(url3); + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path15}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve8, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve8).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve8(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); + let path15 = urlParsed.pathname; + path15 = path15 || "/"; + path15 = escape(path15); + urlParsed.pathname = path15; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + 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); + 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); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url2, host) { + const urlParsed = new URL(url2); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url2) { + let queryString = new URL(url2).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve8, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve8(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path15 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path15}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path15}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path15 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path15}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url2 = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url2], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url2], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url3, options) { - var _a, _b; - if (url3 === void 0) { + constructor(url2, options) { + if (url2 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url3; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url2; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url3, pipeline) { - this.url = escapeURLPath(url3); - this.accountName = getAccountNameFromUrl(url3); + constructor(url2, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url2); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url2); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve8, reject) => { + this.resolve = resolve8; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve8) => setTimeout(() => resolve8(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString3, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve8, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve8).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve8(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve8, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve8(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve8(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve8, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve8(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve8, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve8, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url3; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + let url2; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve8) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve8(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve8) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve8(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url3; + let url2; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url3 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url2 = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url3; + let url2; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url3 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url2 = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path15 = getURLPath(subRequest.url); + const path15 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path15 || path15 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url3, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url3); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path15 = (0, utils_common_js_1.getURLPath)(url2); if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url3, pipeline); + super(url2, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve8) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve8(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve8) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve8((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url3, credentialOrPipeline, options) { + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url3, pipeline); + super(url2, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core18 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core18 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core18 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core18 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core18 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs17 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core18 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs17 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs17.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve8) => { timeoutHandle = setTimeout(() => resolve8("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core18 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core18 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core18.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core18.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core18 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs17 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core18 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs17 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core18.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs17.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core18.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url2) { if (!url2) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url2} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { 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* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io7 = __importStar4(require_io3()); + var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path15 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path15 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io7.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path15.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core18 = __importStar4(require_core()); - var path15 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core18 = __importStar2(require_core()); + var path15 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core18.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core18.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core18.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path15.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path15.dirname(filePath); - const upperName = path15.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path15.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path15.join(dest, path15.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path15.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path15.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path15.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os3 = require("os"); - var cp = require("child_process"); - var fs17 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os3.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs17.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os3.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs17.existsSync(lsbReleaseFile)) { - contents = fs17.readFileSync(lsbReleaseFile).toString(); - } else if (fs17.existsSync(osReleaseFile)) { - contents = fs17.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path15 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path15.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar2(require("fs")); + var path15 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path15 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path15 = __importStar2(require("path")); + var io7 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable8; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning12(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning12; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info7; + function startGroup4(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup4; + function endGroup4() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup4; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup4(name); + let result; + try { + result = yield fn(); + } finally { + endGroup4(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os3 = require("os"); + var cp = require("child_process"); + var fs17 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os3.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os3.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs17.existsSync(lsbReleaseFile)) { + contents = fs17.readFileSync(lsbReleaseFile).toString(); + } else if (fs17.existsSync(osReleaseFile)) { + contents = fs17.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core18 = __importStar4(require_core()); - var io7 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core18 = __importStar2(require_core3()); + var io7 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path15.join(_getTempDirectory(), crypto2.randomUUID()); yield io7.mkdirP(path15.dirname(dest)); core18.debug(`Downloading ${url2}`); core18.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io7.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; if (!core18.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os3.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path15.join(_getTempDirectory(), crypto.randomUUID()); + dest = path15.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core18.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80322,7 +87202,7 @@ var require_follow_redirects = __commonJS({ var require_config2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -80334,7 +87214,7 @@ var require_config2 = __commonJS({ exports2.getConcurrency = getConcurrency; exports2.getUploadChunkTimeout = getUploadChunkTimeout; exports2.getMaxArtifactListCount = getMaxArtifactListCount; - var os_1 = __importDefault4(require("os")); + var os_1 = __importDefault2(require("os")); var core_1 = require_core(); function getUploadChunkSize() { return 8 * 1024 * 1024; @@ -80418,13 +87298,13 @@ var require_timestamp = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Timestamp = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var Timestamp$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.Timestamp", [ @@ -80567,13 +87447,13 @@ var require_wrappers = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BytesValue = exports2.StringValue = exports2.BoolValue = exports2.UInt32Value = exports2.Int32Value = exports2.UInt64Value = exports2.Int64Value = exports2.FloatValue = exports2.DoubleValue = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var DoubleValue$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.DoubleValue", [ @@ -81159,12 +88039,12 @@ var require_artifact = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArtifactService = exports2.DeleteArtifactResponse = exports2.DeleteArtifactRequest = exports2.GetSignedArtifactURLResponse = exports2.GetSignedArtifactURLRequest = exports2.ListArtifactsResponse_MonolithArtifact = exports2.ListArtifactsResponse = exports2.ListArtifactsRequest = exports2.FinalizeArtifactResponse = exports2.FinalizeArtifactRequest = exports2.CreateArtifactResponse = exports2.CreateArtifactRequest = exports2.FinalizeMigratedArtifactResponse = exports2.FinalizeMigratedArtifactRequest = exports2.MigrateArtifactResponse = exports2.MigrateArtifactRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var wrappers_1 = require_wrappers(); var wrappers_2 = require_wrappers(); var timestamp_1 = require_timestamp(); @@ -82366,7 +89246,7 @@ var require_artifact_twirp_client = __commonJS({ var require_generated = __commonJS({ "node_modules/@actions/artifact/lib/generated/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82379,14 +89259,14 @@ var require_generated = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar4(require_timestamp(), exports2); - __exportStar4(require_wrappers(), exports2); - __exportStar4(require_artifact(), exports2); - __exportStar4(require_artifact_twirp_client(), exports2); + __exportStar2(require_timestamp(), exports2); + __exportStar2(require_wrappers(), exports2); + __exportStar2(require_artifact(), exports2); + __exportStar2(require_artifact_twirp_client(), exports2); } }); @@ -82394,7 +89274,7 @@ var require_generated = __commonJS({ var require_retention = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/retention.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82407,34 +89287,34 @@ var require_retention = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = getExpiration; var generated_1 = require_generated(); - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; @@ -82519,817 +89399,12 @@ The following characters are not allowed in files that are uploaded due to limit } }); -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js -var require_proxy6 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js -var require_lib7 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy6()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js -var require_auth3 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact/package.json var require_package3 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", - version: "4.0.0", + version: "5.0.1", preview: true, description: "Actions artifact lib", keywords: [ @@ -83369,11 +89444,10 @@ var require_package3 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.10.0", + "@actions/core": "^2.0.0", "@actions/github": "^6.0.1", - "@actions/http-client": "^2.1.0", - "@azure/core-http": "^3.0.5", - "@azure/storage-blob": "^12.15.0", + "@actions/http-client": "^3.0.0", + "@azure/storage-blob": "^12.29.1", "@octokit/core": "^5.2.1", "@octokit/plugin-request-log": "^1.0.4", "@octokit/plugin-retry": "^3.0.9", @@ -83547,10 +89621,10 @@ var require_jwt_decode_cjs = __commonJS({ }); // node_modules/@actions/artifact/lib/internal/shared/util.js -var require_util11 = __commonJS({ +var require_util10 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83563,40 +89637,40 @@ var require_util11 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = getBackendIdsFromToken; exports2.maskSigUrl = maskSigUrl; exports2.maskSecretUrls = maskSecretUrls; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core()); var config_1 = require_config2(); - var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); + var jwt_decode_1 = __importDefault2(require_jwt_decode_cjs()); var core_1 = require_core(); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); function getBackendIdsFromToken() { @@ -83660,7 +89734,7 @@ var require_util11 = __commonJS({ var require_artifact_twirp_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/artifact-twirp-client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -83689,14 +89763,14 @@ var require_artifact_twirp_client2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.internalArtifactTwirpClient = internalArtifactTwirpClient; - var http_client_1 = require_lib7(); - var auth_1 = require_auth3(); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); var core_1 = require_core(); var generated_1 = require_generated(); var config_1 = require_config2(); var user_agent_1 = require_user_agent2(); var errors_1 = require_errors3(); - var util_1 = require_util11(); + var util_1 = require_util10(); var ArtifactHttpClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -83720,14 +89794,14 @@ var require_artifact_twirp_client2 = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { 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* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; @@ -83737,7 +89811,7 @@ var require_artifact_twirp_client2 = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -83808,7 +89882,7 @@ var require_artifact_twirp_client2 = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } @@ -83835,7 +89909,7 @@ var require_artifact_twirp_client2 = __commonJS({ var require_upload_zip_specification = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-zip-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83848,34 +89922,34 @@ var require_upload_zip_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - var fs17 = __importStar4(require("fs")); + var fs17 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); @@ -83929,7 +90003,7 @@ var require_upload_zip_specification = __commonJS({ var require_blob_upload = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/blob-upload.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -83942,31 +90016,31 @@ var require_blob_upload = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -83995,18 +90069,18 @@ var require_blob_upload = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadZipToBlobStorage = uploadZipToBlobStorage; - var storage_blob_1 = require_dist7(); + var storage_blob_1 = require_commonjs15(); var config_1 = require_config2(); - var core18 = __importStar4(require_core()); - var crypto = __importStar4(require("crypto")); - var stream2 = __importStar4(require("stream")); + var core18 = __importStar2(require_core()); + var crypto2 = __importStar2(require("crypto")); + var stream2 = __importStar2(require("stream")); var errors_1 = require_errors3(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let uploadByteCount = 0; let lastProgressTime = Date.now(); const abortController = new AbortController(); - const chunkTimer = (interval) => __awaiter4(this, void 0, void 0, function* () { + const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { @@ -84036,7 +90110,7 @@ var require_blob_upload = __commonJS({ }; let sha256Hash = void 0; const uploadStream = new stream2.PassThrough(); - const hashStream = crypto.createHash("sha256"); + const hashStream = crypto2.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); core18.info("Beginning upload of artifact content to blob storage"); @@ -85926,8 +92000,8 @@ var require_async = __commonJS({ var mapLimit$1 = awaitify(mapLimit, 4); function concatLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, ...args) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { if (err) return iterCb(err); return iterCb(err, args); }); @@ -86133,10 +92207,10 @@ var require_async = __commonJS({ var forever$1 = awaitify(forever, 2); function groupByLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, key) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { if (err) return iterCb(err); - return iterCb(err, { key, val: val2 }); + return iterCb(err, { key, val }); }); }, (err, mapResults) => { var result = {}; @@ -86144,11 +92218,11 @@ var require_async = __commonJS({ for (var i = 0; i < mapResults.length; i++) { if (mapResults[i]) { var { key } = mapResults[i]; - var { val: val2 } = mapResults[i]; + var { val } = mapResults[i]; if (hasOwnProperty.call(result, key)) { - result[key].push(val2); + result[key].push(val); } else { - result[key] = [val2]; + result[key] = [val]; } } } @@ -86167,8 +92241,8 @@ var require_async = __commonJS({ callback = once(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); - return eachOfLimit$2(limit)(obj, (val2, key, next) => { - _iteratee(val2, key, (err, result) => { + return eachOfLimit$2(limit)(obj, (val, key, next) => { + _iteratee(val, key, (err, result) => { if (err) return next(err); newObj[key] = result; next(err); @@ -87488,8 +93562,8 @@ var require_graceful_fs = __commonJS({ get: function() { return ReadStream; }, - set: function(val2) { - ReadStream = val2; + set: function(val) { + ReadStream = val; }, enumerable: true, configurable: true @@ -87498,8 +93572,8 @@ var require_graceful_fs = __commonJS({ get: function() { return WriteStream; }, - set: function(val2) { - WriteStream = val2; + set: function(val) { + WriteStream = val; }, enumerable: true, configurable: true @@ -87509,8 +93583,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileReadStream; }, - set: function(val2) { - FileReadStream = val2; + set: function(val) { + FileReadStream = val; }, enumerable: true, configurable: true @@ -87520,8 +93594,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileWriteStream; }, - set: function(val2) { - FileWriteStream = val2; + set: function(val) { + FileWriteStream = val; }, enumerable: true, configurable: true @@ -87775,7 +93849,7 @@ var require_safe_buffer = __commonJS({ }); // node_modules/core-util-is/lib/util.js -var require_util12 = __commonJS({ +var require_util11 = __commonJS({ "node_modules/core-util-is/lib/util.js"(exports2) { function isArray(arg) { if (Array.isArray) { @@ -88057,7 +94131,7 @@ var require_stream_writable = __commonJS({ var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() @@ -88493,7 +94567,7 @@ var require_stream_duplex = __commonJS({ return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var Readable2 = require_stream_readable(); var Writable = require_stream_writable(); @@ -88818,7 +94892,7 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var debugUtil = require("util"); var debug5 = void 0; @@ -89487,7 +95561,7 @@ var require_stream_transform = __commonJS({ "use strict"; module2.exports = Transform; var Duplex = require_stream_duplex(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(Transform, Duplex); function afterTransform(er, data) { @@ -89587,7 +95661,7 @@ var require_stream_passthrough = __commonJS({ "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(PassThrough, Transform); function PassThrough(options) { @@ -90505,8 +96579,8 @@ var require_primordials = __commonJS({ PromiseReject(err) { return Promise.reject(err); }, - PromiseResolve(val2) { - return Promise.resolve(val2); + PromiseResolve(val) { + return Promise.resolve(val); }, ReflectApply: Reflect.apply, RegExpPrototypeTest(self2, value) { @@ -91211,7 +97285,7 @@ var require_abort_controller = __commonJS({ }); // node_modules/readable-stream/lib/ours/util.js -var require_util13 = __commonJS({ +var require_util12 = __commonJS({ "node_modules/readable-stream/lib/ours/util.js"(exports2, module2) { "use strict"; var bufferModule = require("buffer"); @@ -91402,7 +97476,7 @@ var require_util13 = __commonJS({ var require_errors4 = __commonJS({ "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; - var { format, inspect, AggregateError: CustomAggregateError } = require_util13(); + var { format, inspect, AggregateError: CustomAggregateError } = require_util12(); var AggregateError = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); var kTypes = [ @@ -91425,14 +97499,14 @@ var require_errors4 = __commonJS({ throw new codes.ERR_INTERNAL_ASSERTION(message); } } - function addNumericalSeparator(val2) { + function addNumericalSeparator(val) { let res = ""; - let i = val2.length; - const start = val2[0] === "-" ? 1 : 0; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; for (; i >= start + 4; i -= 3) { - res = `_${val2.slice(i - 3, i)}${res}`; + res = `_${val.slice(i - 3, i)}${res}`; } - return `${val2.slice(0, i)}${res}`; + return `${val.slice(0, i)}${res}`; } function getMessage(key, msg, args) { if (typeof msg === "function") { @@ -91738,8 +97812,8 @@ var require_validators = __commonJS({ hideStackFrames, codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } } = require_errors4(); - var { normalizeEncoding } = require_util13(); - var { isAsyncFunction, isArrayBufferView } = require_util13().types; + var { normalizeEncoding } = require_util12(); + var { isAsyncFunction, isArrayBufferView } = require_util12().types; var signals = {}; function isInt32(value) { return value === (value | 0); @@ -91986,7 +98060,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils6 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -92200,7 +98274,7 @@ var require_end_of_stream = __commonJS({ var process2 = require_process(); var { AbortError, codes } = require_errors4(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once } = require_util13(); + var { kEmptyObject, once } = require_util12(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -92218,7 +98292,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils6(); + } = require_utils9(); var addAbortListener; function isRequest(stream2) { return stream2.setHeader && typeof stream2.abort === "function"; @@ -92373,7 +98447,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -92400,7 +98474,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -92456,7 +98530,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors4(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils9(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -92794,7 +98868,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors4(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils9(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -92830,7 +98904,7 @@ var require_add_abort_signal = __commonJS({ if (signal.aborted) { onAbort(); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(signal, onAbort); eos(stream2, disposable[SymbolDispose]); } @@ -92845,7 +98919,7 @@ var require_buffer_list = __commonJS({ "use strict"; var { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array: Uint8Array2 } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); - var { inspect } = require_util13(); + var { inspect } = require_util12(); module2.exports = class BufferList { constructor() { this.head = null; @@ -93156,7 +99230,7 @@ var require_readable3 = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); - var debug5 = require_util13().debuglog("stream", (fn) => { + var debug5 = require_util12().debuglog("stream", (fn) => { debug5 = fn; }); var BufferList = require_buffer_list(); @@ -93901,9 +99975,9 @@ var require_readable3 = __commonJS({ const r = this._readableState; return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted; }, - set(val2) { + set(val) { if (this._readableState) { - this._readableState.readable = !!val2; + this._readableState.readable = !!val; } } }, @@ -94615,9 +100689,9 @@ var require_writable = __commonJS({ const w = this._writableState; return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended; }, - set(val2) { + set(val) { if (this._writableState) { - this._writableState.writable = !!val2; + this._writableState.writable = !!val; } } }, @@ -94731,7 +100805,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils6(); + } = require_utils9(); var eos = require_end_of_stream(); var { AbortError, @@ -94741,7 +100815,7 @@ var require_duplexify = __commonJS({ var Duplex = require_duplex(); var Readable2 = require_readable3(); var Writable = require_writable(); - var { createDeferredPromise } = require_util13(); + var { createDeferredPromise } = require_util12(); var from = require_from(); var Blob2 = globalThis.Blob || bufferModule.Blob; var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { @@ -94814,9 +100888,9 @@ var require_duplexify = __commonJS({ const promise = FunctionPrototypeCall( then2, value, - (val2) => { - if (val2 != null) { - throw new ERR_INVALID_RETURN_VALUE("nully", "body", val2); + (val) => { + if (val != null) { + throw new ERR_INVALID_RETURN_VALUE("nully", "body", val); } }, (err) => { @@ -94870,9 +100944,9 @@ var require_duplexify = __commonJS({ FunctionPrototypeCall( then, body, - (val2) => { - if (val2 != null) { - d.push(val2); + (val) => { + if (val != null) { + d.push(val); } d.push(null); }, @@ -95255,13 +101329,13 @@ var require_transform = __commonJS({ const rState = this._readableState; const wState = this._writableState; const length = rState.length; - this._transform(chunk, encoding, (err, val2) => { + this._transform(chunk, encoding, (err, val) => { if (err) { callback(err); return; } - if (val2 != null) { - this.push(val2); + if (val != null) { + this.push(val); } if (wState.ended || // Backwards compat. length === rState.length || // Backwards compat. @@ -95302,12 +101376,12 @@ var require_passthrough2 = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/pipeline.js -var require_pipeline3 = __commonJS({ +var require_pipeline4 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { var process2 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once } = require_util13(); + var { once } = require_util12(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -95331,7 +101405,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils6(); + } = require_utils9(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable2; @@ -95364,19 +101438,19 @@ var require_pipeline3 = __commonJS({ validateFunction(streams[streams.length - 1], "streams[stream.length - 1]"); return streams.pop(); } - function makeAsyncIterable(val2) { - if (isIterable(val2)) { - return val2; - } else if (isReadableNodeStream(val2)) { - return fromReadable(val2); + function makeAsyncIterable(val) { + if (isIterable(val)) { + return val; + } else if (isReadableNodeStream(val)) { + return fromReadable(val); } - throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val2); + throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); } - async function* fromReadable(val2) { + async function* fromReadable(val) { if (!Readable2) { Readable2 = require_readable3(); } - yield* Readable2.prototype[SymbolAsyncIterator].call(val2); + yield* Readable2.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { let error3; @@ -95476,7 +101550,7 @@ var require_pipeline3 = __commonJS({ function abort() { finishImpl(new AbortError()); } - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; let disposable; if (outerSignal) { disposable = addAbortListener(outerSignal, abort); @@ -95577,10 +101651,10 @@ var require_pipeline3 = __commonJS({ finishCount++; then.call( ret, - (val2) => { - value = val2; - if (val2 != null) { - pt.write(val2); + (val) => { + value = val; + if (val != null) { + pt.write(val); } if (end) { pt.end(); @@ -95733,7 +101807,7 @@ var require_pipeline3 = __commonJS({ var require_compose = __commonJS({ "node_modules/readable-stream/lib/internal/streams/compose.js"(exports2, module2) { "use strict"; - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var Duplex = require_duplex(); var { destroyer } = require_destroy2(); var { @@ -95744,7 +101818,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils6(); + } = require_utils9(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -95937,8 +102011,8 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils6(); - var { deprecate } = require_util13(); + var { isWritable, isNodeStream } = require_utils9(); + var { deprecate } = require_util12(); var { ArrayPrototypePush, Boolean: Boolean2, @@ -95991,7 +102065,7 @@ var require_operators = __commonJS({ validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; return async function* map3() { - const signal = require_util13().AbortSignalAny( + const signal = require_util12().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); const stream2 = this; @@ -96019,7 +102093,7 @@ var require_operators = __commonJS({ } async function pump() { try { - for await (let val2 of stream2) { + for await (let val of stream2) { if (done) { return; } @@ -96027,17 +102101,17 @@ var require_operators = __commonJS({ throw new AbortError(); } try { - val2 = fn(val2, signalOpt); - if (val2 === kEmpty) { + val = fn(val, signalOpt); + if (val === kEmpty) { continue; } - val2 = PromiseResolve(val2); + val = PromiseResolve(val); } catch (err) { - val2 = PromiseReject(err); + val = PromiseReject(err); } cnt += 1; - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); if (next) { next(); next = null; @@ -96050,9 +102124,9 @@ var require_operators = __commonJS({ } queue.push(kEof); } catch (err) { - const val2 = PromiseReject(err); - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + const val = PromiseReject(err); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); } finally { done = true; if (next) { @@ -96065,15 +102139,15 @@ var require_operators = __commonJS({ try { while (true) { while (queue.length > 0) { - const val2 = await queue[0]; - if (val2 === kEof) { + const val = await queue[0]; + if (val === kEof) { return; } if (signal.aborted) { throw new AbortError(); } - if (val2 !== kEmpty) { - yield val2; + if (val !== kEmpty) { + yield val; } queue.shift(); maybeResume(); @@ -96100,14 +102174,14 @@ var require_operators = __commonJS({ } return async function* asIndexedPairs2() { let index = 0; - for await (const val2 of this) { + for await (const val of this) { var _options$signal; if (options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted) { throw new AbortError({ cause: options.signal.reason }); } - yield [index++, val2]; + yield [index++, val]; } }.call(this); } @@ -96227,22 +102301,22 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } const result = []; - for await (const val2 of this) { + for await (const val of this) { var _options$signal4; if (options !== null && options !== void 0 && (_options$signal4 = options.signal) !== null && _options$signal4 !== void 0 && _options$signal4.aborted) { throw new AbortError(void 0, { cause: options.signal.reason }); } - ArrayPrototypePush(result, val2); + ArrayPrototypePush(result, val); } return result; } function flatMap(fn, options) { const values = map2.call(this, fn, options); return async function* flatMap2() { - for await (const val2 of values) { - yield* val2; + for await (const val of values) { + yield* val; } }.call(this); } @@ -96269,13 +102343,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal6; if (options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted) { throw new AbortError(); } if (number-- <= 0) { - yield val2; + yield val; } } }.call(this); @@ -96293,13 +102367,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal8; if (options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted) { throw new AbortError(); } if (number-- > 0) { - yield val2; + yield val; } if (number <= 0) { return; @@ -96332,8 +102406,8 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils6(); - var { pipelineImpl: pl } = require_pipeline3(); + var { isIterable, isNodeStream, isWebStream } = require_utils9(); + var { pipelineImpl: pl } = require_pipeline4(); var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { @@ -96376,18 +102450,18 @@ var require_stream2 = __commonJS({ var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { promisify: { custom: customPromisify } - } = require_util13(); + } = require_util12(); var { streamReturningOperators, promiseReturningOperators } = require_operators(); var { codes: { ERR_ILLEGAL_CONSTRUCTOR } } = require_errors4(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state3(); - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises5 = require_promises(); - var utils = require_utils6(); + var utils = require_utils9(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -97357,7 +103431,7 @@ var require_isPlainObject = __commonJS({ }); // node_modules/@isaacs/balanced-match/dist/commonjs/index.js -var require_commonjs13 = __commonJS({ +var require_commonjs18 = __commonJS({ "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -97419,12 +103493,12 @@ var require_commonjs13 = __commonJS({ }); // node_modules/@isaacs/brace-expansion/dist/commonjs/index.js -var require_commonjs14 = __commonJS({ +var require_commonjs19 = __commonJS({ "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.expand = expand; - var balanced_match_1 = require_commonjs13(); + var balanced_match_1 = require_commonjs18(); var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; @@ -98239,12 +104313,12 @@ var require_escape = __commonJS({ }); // node_modules/glob/node_modules/minimatch/dist/commonjs/index.js -var require_commonjs15 = __commonJS({ +var require_commonjs20 = __commonJS({ "node_modules/glob/node_modules/minimatch/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = require_commonjs14(); + var brace_expansion_1 = require_commonjs19(); var assert_valid_pattern_js_1 = require_assert_valid_pattern(); var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); @@ -98999,7 +105073,7 @@ var require_commonjs15 = __commonJS({ }); // node_modules/lru-cache/dist/commonjs/index.js -var require_commonjs16 = __commonJS({ +var require_commonjs21 = __commonJS({ "node_modules/lru-cache/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -99895,14 +105969,14 @@ var require_commonjs16 = __commonJS({ pop() { try { while (this.#size) { - const val2 = this.#valList[this.#head]; + const val = this.#valList[this.#head]; this.#evict(true); - if (this.#isBackgroundFetch(val2)) { - if (val2.__staleWhileFetching) { - return val2.__staleWhileFetching; + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; } - } else if (val2 !== void 0) { - return val2; + } else if (val !== void 0) { + return val; } } } finally { @@ -100393,10 +106467,10 @@ var require_commonjs16 = __commonJS({ }); // node_modules/minipass/dist/commonjs/index.js -var require_commonjs17 = __commonJS({ +var require_commonjs22 = __commonJS({ "node_modules/minipass/dist/commonjs/index.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -100406,7 +106480,7 @@ var require_commonjs17 = __commonJS({ stderr: null }; var node_events_1 = require("node:events"); - var node_stream_1 = __importDefault4(require("node:stream")); + var node_stream_1 = __importDefault2(require("node:stream")); var node_string_decoder_1 = require("node:string_decoder"); var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)); exports2.isStream = isStream; @@ -101285,10 +107359,10 @@ var require_commonjs17 = __commonJS({ }); // node_modules/path-scurry/dist/commonjs/index.js -var require_commonjs18 = __commonJS({ +var require_commonjs23 = __commonJS({ "node_modules/path-scurry/dist/commonjs/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -101301,30 +107375,30 @@ var require_commonjs18 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0; - var lru_cache_1 = require_commonjs16(); + var lru_cache_1 = require_commonjs21(); var node_path_1 = require("node:path"); var node_url_1 = require("node:url"); var fs_1 = require("fs"); - var actualFS = __importStar4(require("node:fs")); + var actualFS = __importStar2(require("node:fs")); var realpathSync = fs_1.realpathSync.native; var promises_1 = require("node:fs/promises"); - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var defaultFS = { lstatSync: fs_1.lstatSync, readdir: fs_1.readdir, @@ -103066,7 +109140,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var isPatternList = (pl) => pl.length >= 1; var isGlobList = (gl) => gl.length >= 1; var Pattern = class _Pattern { @@ -103240,7 +109314,7 @@ var require_ignore = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { @@ -103337,7 +109411,7 @@ var require_processor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var HasWalkedCache = class _HasWalkedCache { store; constructor(store = /* @__PURE__ */ new Map()) { @@ -103570,7 +109644,7 @@ var require_walker = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; @@ -103910,9 +109984,9 @@ var require_glob2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Glob = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var node_url_1 = require("node:url"); - var path_scurry_1 = require_commonjs18(); + var path_scurry_1 = require_commonjs23(); var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; @@ -104123,7 +110197,7 @@ var require_has_magic = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasMagic = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var hasMagic = (pattern, options = {}) => { if (!Array.isArray(pattern)) { pattern = [pattern]; @@ -104139,7 +110213,7 @@ var require_has_magic = __commonJS({ }); // node_modules/glob/dist/commonjs/index.js -var require_commonjs19 = __commonJS({ +var require_commonjs24 = __commonJS({ "node_modules/glob/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -104149,10 +110223,10 @@ var require_commonjs19 = __commonJS({ exports2.globSync = globSync; exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); - var minimatch_2 = require_commonjs15(); + var minimatch_2 = require_commonjs20(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { return minimatch_2.escape; } }); @@ -104229,7 +110303,7 @@ var require_file3 = __commonJS({ var difference = require_difference(); var union = require_union(); var isPlainObject = require_isPlainObject(); - var glob2 = require_commonjs19(); + var glob2 = require_commonjs24(); var file = module2.exports = {}; var pathSeparatorRe = /[\/\\]/g; var processPatterns = function(patterns, fn) { @@ -104493,7 +110567,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error2 = __commonJS({ +var require_error3 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -104526,7 +110600,7 @@ var require_error2 = __commonJS({ }); // node_modules/archiver/lib/core.js -var require_core2 = __commonJS({ +var require_core4 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs17 = require("fs"); var glob2 = require_readdir_glob(); @@ -104534,7 +110608,7 @@ var require_core2 = __commonJS({ var path15 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error2(); + var ArchiverError = require_error3(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -105077,7 +111151,7 @@ var require_archive_entry = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/util.js -var require_util14 = __commonJS({ +var require_util13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { var util = module2.exports = {}; util.dateToDos = function(d, forceLocalTime) { @@ -105088,7 +111162,7 @@ var require_util14 = __commonJS({ } else if (year >= 2044) { return 2141175677; } - var val2 = { + var val = { year, month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), date: forceLocalTime ? d.getDate() : d.getUTCDate(), @@ -105096,7 +111170,7 @@ var require_util14 = __commonJS({ minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() }; - return val2.year - 1980 << 25 | val2.month + 1 << 21 | val2.date << 16 | val2.hours << 11 | val2.minutes << 5 | val2.seconds / 2; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; }; util.dosToDate = function(dos) { return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); @@ -105135,7 +111209,7 @@ var require_util14 = __commonJS({ // node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js var require_general_purpose_bit = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { - var zipUtil = require_util14(); + var zipUtil = require_util13(); var DATA_DESCRIPTOR_FLAG = 1 << 3; var ENCRYPTION_FLAG = 1 << 0; var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; @@ -105262,7 +111336,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants9 = __commonJS({ +var require_constants13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -105346,8 +111420,8 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants9(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var zipUtil = require_util13(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { return new ZipArchiveEntry(name); @@ -105527,7 +111601,7 @@ var require_is_stream2 = __commonJS({ }); // node_modules/compress-commons/lib/util/index.js -var require_util15 = __commonJS({ +var require_util14 = __commonJS({ "node_modules/compress-commons/lib/util/index.js"(exports2, module2) { var Stream = require("stream").Stream; var PassThrough = require_ours().PassThrough; @@ -105555,7 +111629,7 @@ var require_archive_output_stream = __commonJS({ var isStream = require_is_stream2(); var Transform = require_ours().Transform; var ArchiveEntry = require_archive_entry(); - var util = require_util15(); + var util = require_util14(); var ArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ArchiveOutputStream)) { return new ArchiveOutputStream(options); @@ -105818,7 +111892,7 @@ var require_deflate_crc32_stream = __commonJS({ }); // node_modules/crc32-stream/lib/index.js -var require_lib8 = __commonJS({ +var require_lib6 = __commonJS({ "node_modules/crc32-stream/lib/index.js"(exports2, module2) { "use strict"; module2.exports = { @@ -105833,14 +111907,14 @@ var require_zip_archive_output_stream = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { var inherits = require("util").inherits; var crc32 = require_crc32(); - var { CRC32Stream } = require_lib8(); - var { DeflateCRC32Stream } = require_lib8(); + var { CRC32Stream } = require_lib6(); + var { DeflateCRC32Stream } = require_lib6(); var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants9(); - var util = require_util15(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var util = require_util14(); + var zipUtil = require_util13(); var ZipArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ZipArchiveOutputStream)) { return new ZipArchiveOutputStream(options); @@ -106338,29 +112412,29 @@ var require_fast_fifo = __commonJS({ this.head.clear(); this.length = 0; } - push(val2) { + push(val) { this.length++; - if (!this.head.push(val2)) { + if (!this.head.push(val)) { const prev = this.head; this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length); - this.head.push(val2); + this.head.push(val); } } shift() { if (this.length !== 0) this.length--; - const val2 = this.tail.shift(); - if (val2 === void 0 && this.tail.next) { + const val = this.tail.shift(); + if (val === void 0 && this.tail.next) { const next = this.tail.next; this.tail.next = null; this.tail = next; return this.tail.shift(); } - return val2; + return val; } peek() { - const val2 = this.tail.peek(); - if (val2 === void 0 && this.tail.next) return this.tail.next.peek(); - return val2; + const val = this.tail.peek(); + if (val === void 0 && this.tail.next) return this.tail.next.peek(); + return val; } isEmpty() { return this.length === 0; @@ -107838,10 +113912,10 @@ var require_headers2 = __commonJS({ for (let j = 156; j < 512; j++) sum += block[j]; return sum; } - function encodeOct(val2, n) { - val2 = val2.toString(8); - if (val2.length > n) return SEVENS.slice(0, n) + " "; - return ZEROS.slice(0, n - val2.length) + val2 + " "; + function encodeOct(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + return ZEROS.slice(0, n - val.length) + val + " "; } function encodeSizeBin(num, buf, off) { buf[off] = 128; @@ -107876,21 +113950,21 @@ var require_headers2 = __commonJS({ } return positive ? sum : -1 * sum; } - function decodeOct(val2, offset, length) { - val2 = val2.subarray(offset, offset + length); + function decodeOct(val, offset, length) { + val = val.subarray(offset, offset + length); offset = 0; - if (val2[offset] & 128) { - return parse256(val2); + if (val[offset] & 128) { + return parse256(val); } else { - while (offset < val2.length && val2[offset] === 32) offset++; - const end = clamp(indexOf(val2, 32, offset, val2.length), val2.length, val2.length); - while (offset < end && val2[offset] === 0) offset++; + while (offset < val.length && val[offset] === 32) offset++; + const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; if (end === offset) return 0; - return parseInt(b4a.toString(val2.subarray(offset, end)), 8); + return parseInt(b4a.toString(val.subarray(offset, end)), 8); } } - function decodeStr(val2, offset, length, encoding) { - return b4a.toString(val2.subarray(offset, indexOf(val2, 0, offset, offset + length)), encoding); + function decodeStr(val, offset, length, encoding) { + return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding); } function addLength(str2) { const len = b4a.byteLength(str2); @@ -108236,7 +114310,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants10 = __commonJS({ +var require_constants14 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -108260,7 +114334,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable: Readable2, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants10(); + var constants = require_constants14(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -108576,7 +114650,7 @@ var require_tar2 = __commonJS({ }); // node_modules/buffer-crc32/dist/index.cjs -var require_dist8 = __commonJS({ +var require_dist5 = __commonJS({ "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) { "use strict"; function getDefaultExportFromCjs(x) { @@ -108888,7 +114962,7 @@ var require_json = __commonJS({ "node_modules/archiver/lib/plugins/json.js"(exports2, module2) { var inherits = require("util").inherits; var Transform = require_ours().Transform; - var crc32 = require_dist8(); + var crc32 = require_dist5(); var util = require_archiver_utils(); var Json = function(options) { if (!(this instanceof Json)) { @@ -108940,7 +115014,7 @@ var require_json = __commonJS({ // node_modules/archiver/index.js var require_archiver = __commonJS({ "node_modules/archiver/index.js"(exports2, module2) { - var Archiver = require_core2(); + var Archiver = require_core4(); var formats = {}; var vending = function(format, options) { return vending.create(format, options); @@ -108984,7 +115058,7 @@ var require_archiver = __commonJS({ var require_zip2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108997,31 +115071,31 @@ var require_zip2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -109051,10 +115125,10 @@ var require_zip2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; exports2.createZipUploadStream = createZipUploadStream; - var stream2 = __importStar4(require("stream")); + var stream2 = __importStar2(require("stream")); var promises_1 = require("fs/promises"); - var archiver2 = __importStar4(require_archiver()); - var core18 = __importStar4(require_core()); + var archiver2 = __importStar2(require_archiver()); + var core18 = __importStar2(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream2.Transform { @@ -109070,7 +115144,7 @@ var require_zip2 = __commonJS({ }; exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification_1) { - return __awaiter4(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { + return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { core18.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), @@ -109129,7 +115203,7 @@ var require_zip2 = __commonJS({ var require_upload_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109142,31 +115216,31 @@ var require_upload_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -109195,18 +115269,18 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = uploadArtifact; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var upload_zip_specification_1 = require_upload_zip_specification(); - var util_1 = require_util11(); + var util_1 = require_util10(); var blob_upload_1 = require_blob_upload(); var zip_1 = require_zip2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, path_and_artifact_name_validation_1.validateArtifactName)(name); (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory); const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory); @@ -110178,18 +116252,18 @@ var require_binary = __commonJS({ return acc; } function decodeBEs(bytes) { - var val2 = decodeBEu(bytes); + var val = decodeBEu(bytes); if ((bytes[0] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function decodeLEs(bytes) { - var val2 = decodeLEu(bytes); + var val = decodeLEu(bytes); if ((bytes[bytes.length - 1] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function words(decode) { var self2 = {}; @@ -111138,7 +117212,7 @@ var require_unzip = __commonJS({ var require_download_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/download/download-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111151,31 +117225,31 @@ var require_download_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -111202,25 +117276,25 @@ var require_download_artifact = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.streamExtractExternal = streamExtractExternal; exports2.downloadArtifactPublic = downloadArtifactPublic; exports2.downloadArtifactInternal = downloadArtifactInternal; - var promises_1 = __importDefault4(require("fs/promises")); - var crypto = __importStar4(require("crypto")); - var stream2 = __importStar4(require("stream")); - var github3 = __importStar4(require_github()); - var core18 = __importStar4(require_core()); - var httpClient = __importStar4(require_lib7()); - var unzip_stream_1 = __importDefault4(require_unzip()); + var promises_1 = __importDefault2(require("fs/promises")); + var crypto2 = __importStar2(require("crypto")); + var stream2 = __importStar2(require("stream")); + var github3 = __importStar2(require_github()); + var core18 = __importStar2(require_core()); + var httpClient = __importStar2(require_lib()); + var unzip_stream_1 = __importDefault2(require_unzip()); var user_agent_1 = require_user_agent2(); var config_1 = require_config2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); - var util_1 = require_util11(); + var util_1 = require_util10(); var errors_1 = require_errors3(); var scrubQueryParameters = (url2) => { const parsed = new URL(url2); @@ -111228,7 +117302,7 @@ var require_download_artifact = __commonJS({ return parsed.toString(); }; function exists(path15) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { yield promises_1.default.access(path15); return true; @@ -111242,7 +117316,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtract(url2, directory) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { @@ -111257,7 +117331,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtractExternal(url_1, directory_1) { - return __awaiter4(this, arguments, void 0, function* (url2, directory, opts = { timeout: 30 * 1e3 }) { + return __awaiter2(this, arguments, void 0, function* (url2, directory, opts = { timeout: 30 * 1e3 }) { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); const response = yield client.get(url2); if (response.message.statusCode !== 200) { @@ -111271,7 +117345,7 @@ var require_download_artifact = __commonJS({ reject(timeoutError); }; const timer = setTimeout(timerFn, opts.timeout); - const hashStream = crypto.createHash("sha256").setEncoding("hex"); + const hashStream = crypto2.createHash("sha256").setEncoding("hex"); const passThrough = new stream2.PassThrough(); response.message.pipe(passThrough); passThrough.pipe(hashStream); @@ -111297,7 +117371,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github3.getOctokit(token); let digestMismatch = false; @@ -111337,7 +117411,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactInternal(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); let digestMismatch = false; @@ -111380,7 +117454,7 @@ Are you trying to download from a different run? Try specifying a github-token w }); } function resolveOrCreateDirectory() { - return __awaiter4(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { + return __awaiter2(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { if (!(yield exists(downloadPath))) { core18.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); @@ -111397,7 +117471,7 @@ Are you trying to download from a different run? Try specifying a github-token w var require_retry_options = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/retry-options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111410,33 +117484,33 @@ var require_retry_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = getRetryOptions; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -111549,7 +117623,7 @@ var require_dist_node17 = __commonJS({ var require_get_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/get-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111562,31 +117636,31 @@ var require_get_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -111618,17 +117692,17 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = getArtifactInternal; var github_1 = require_github(); var plugin_retry_1 = require_dist_node17(); - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core()); var utils_1 = require_utils4(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node16(); - var util_1 = require_util11(); + var util_1 = require_util10(); var user_agent_1 = require_user_agent2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -111670,7 +117744,7 @@ var require_get_artifact = __commonJS({ }); } function getArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); @@ -111708,7 +117782,7 @@ var require_get_artifact = __commonJS({ var require_delete_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/delete/delete-artifact.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -111746,12 +117820,12 @@ var require_delete_artifact = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var generated_1 = require_generated(); var get_artifact_1 = require_get_artifact(); var errors_1 = require_errors3(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -111777,7 +117851,7 @@ var require_delete_artifact = __commonJS({ }); } function deleteArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const listReq = { @@ -111813,7 +117887,7 @@ var require_delete_artifact = __commonJS({ var require_list_artifacts = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/list-artifacts.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -111851,14 +117925,14 @@ var require_list_artifacts = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var config_1 = require_config2(); var generated_1 = require_generated(); var maximumArtifactCount = (0, config_1.getMaxArtifactListCount)(); var paginationCount = 100; var maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount); function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) { - return __awaiter4(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { + return __awaiter2(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { (0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); let artifacts = []; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); @@ -111923,7 +117997,7 @@ var require_list_artifacts = __commonJS({ }); } function listArtifactsInternal() { - return __awaiter4(this, arguments, void 0, function* (latest = false) { + return __awaiter2(this, arguments, void 0, function* (latest = false) { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const req = { @@ -111969,7 +118043,7 @@ var require_list_artifacts = __commonJS({ var require_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -111996,7 +118070,7 @@ var require_client2 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __rest4 = exports2 && exports2.__rest || function(s, e) { + var __rest2 = exports2 && exports2.__rest || function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -112019,7 +118093,7 @@ var require_client2 = __commonJS({ var errors_1 = require_errors3(); var DefaultArtifactClient2 = class { uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112036,13 +118110,13 @@ If the error persists, please check whether Actions is operating normally at [ht }); } downloadArtifact(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); } if (options === null || options === void 0 ? void 0 : options.findBy) { - const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest4(options, ["findBy"]); + const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest2(options, ["findBy"]); return (0, download_artifact_1.downloadArtifactPublic)(artifactId, repositoryOwner, repositoryName, token, downloadOptions); } return (0, download_artifact_1.downloadArtifactInternal)(artifactId, options); @@ -112057,7 +118131,7 @@ If the error persists, please check whether Actions and API requests are operati }); } listArtifacts(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112078,7 +118152,7 @@ If the error persists, please check whether Actions and API requests are operati }); } getArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112099,7 +118173,7 @@ If the error persists, please check whether Actions and API requests are operati }); } deleteArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -112136,7 +118210,7 @@ var require_interfaces2 = __commonJS({ var require_artifact2 = __commonJS({ "node_modules/@actions/artifact/lib/artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112149,26 +118223,2815 @@ var require_artifact2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var client_1 = require_client2(); - __exportStar4(require_interfaces2(), exports2); - __exportStar4(require_errors3(), exports2); - __exportStar4(require_client2(), exports2); + __exportStar2(require_interfaces2(), exports2); + __exportStar2(require_errors3(), exports2); + __exportStar2(require_client2(), exports2); var client = new client_1.DefaultArtifactClient(); exports2.default = client; } }); +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js +var require_utils10 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js +var require_command4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js +var require_file_command4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs17 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs17.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js +var require_proxy5 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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(url2, base) { + super(url2, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js +var require_lib7 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy5()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve8(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve8(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve8(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve8(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve8(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js +var require_auth4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib7(); + var auth_1 = require_auth4(); + var core_1 = require_core5(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js +var require_summary4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js +var require_path_utils4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path15 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path15.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar2(require("fs")); + var path15 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path15 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path15 = __importStar2(require("path")); + var io7 = __importStar2(require_io4()); + var ioUtil = __importStar2(require_io_util4()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve8(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js +var require_exec4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner4()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js +var require_platform4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec4()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js +var require_core5 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command4(); + var file_command_1 = require_file_command4(); + var utils_1 = require_utils10(); + var os3 = __importStar2(require("os")); + var path15 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils4(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable8(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable8; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning12(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning12; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info7; + function startGroup4(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup4; + function endGroup4() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup4; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup4(name); + let result; + try { + result = yield fn(); + } finally { + endGroup4(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary4(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary4(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils4(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform4()); + } +}); + // node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js var require_path_and_artifact_name_validation2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.checkArtifactFilePath = exports2.checkArtifactName = void 0; - var core_1 = require_core(); + var core_1 = require_core5(); var invalidArtifactFilePathCharacters = /* @__PURE__ */ new Map([ ['"', ' Double quote "'], [":", " Colon :"], @@ -112224,7 +121087,7 @@ The following characters are not allowed in files that are uploaded due to limit var require_upload_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112237,24 +121100,24 @@ var require_upload_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs17 = __importStar4(require("fs")); - var core_1 = require_core(); + var fs17 = __importStar2(require("fs")); + var core_1 = require_core5(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { @@ -112299,7 +121162,7 @@ var require_tmp = __commonJS({ var fs17 = require("fs"); var os3 = require("os"); var path15 = require("path"); - var crypto = require("crypto"); + var crypto2 = require("crypto"); var _c = { fs: fs17.constants, os: os3.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; @@ -112479,9 +121342,9 @@ var require_tmp = __commonJS({ function _randomChars(howMany) { let value = [], rnd = null; try { - rnd = crypto.randomBytes(howMany); + rnd = crypto2.randomBytes(howMany); } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); + rnd = crypto2.pseudoRandomBytes(howMany); } for (let i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); @@ -112696,811 +121559,6 @@ var require_tmp_promise = __commonJS({ } }); -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js -var require_proxy7 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js -var require_lib9 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy7()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve8(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve8(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve8(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve8) => setTimeout(() => resolve8(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve8(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve8(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js -var require_auth4 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact-legacy/lib/internal/config-variables.js var require_config_variables = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/config-variables.js"(exports2) { @@ -113873,10 +121931,10 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils7 = __commonJS({ +var require_utils11 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -113903,18 +121961,18 @@ var require_utils7 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.digestForStream = exports2.sleep = exports2.getProperRetention = exports2.rmFile = exports2.getFileSize = exports2.createEmptyFilesForArtifact = exports2.createDirectoriesForArtifact = exports2.displayHttpDiagnostics = exports2.getArtifactUrl = exports2.createHttpClient = exports2.getUploadHeaders = exports2.getDownloadHeaders = exports2.getContentRange = exports2.tryGetRetryAfterValueTimeInMilliseconds = exports2.isThrottledStatusCode = exports2.isRetryableStatusCode = exports2.isForbiddenStatusCode = exports2.isSuccessStatusCode = exports2.getApiVersion = exports2.parseEnvNumber = exports2.getExponentialRetryTimeInMilliseconds = void 0; - var crypto_1 = __importDefault4(require("crypto")); + var crypto_1 = __importDefault2(require("crypto")); var fs_1 = require("fs"); - var core_1 = require_core(); - var http_client_1 = require_lib9(); + var core_1 = require_core5(); + var http_client_1 = require_lib7(); var auth_1 = require_auth4(); var config_variables_1 = require_config_variables(); - var crc64_1 = __importDefault4(require_crc64()); + var crc64_1 = __importDefault2(require_crc64()); function getExponentialRetryTimeInMilliseconds(retryCount) { if (retryCount < 0) { throw new Error("RetryCount should not be negative"); @@ -114060,7 +122118,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.displayHttpDiagnostics = displayHttpDiagnostics; function createDirectoriesForArtifact(directories) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const directory of directories) { yield fs_1.promises.mkdir(directory, { recursive: true @@ -114070,7 +122128,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createDirectoriesForArtifact = createDirectoriesForArtifact; function createEmptyFilesForArtifact(emptyFilesToCreate) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const filePath of emptyFilesToCreate) { yield (yield fs_1.promises.open(filePath, "w")).close(); } @@ -114078,7 +122136,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createEmptyFilesForArtifact = createEmptyFilesForArtifact; function getFileSize(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const stats = yield fs_1.promises.stat(filePath); (0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`); return stats.size; @@ -114086,7 +122144,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getFileSize = getFileSize; function rmFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield fs_1.promises.unlink(filePath); }); } @@ -114107,13 +122165,13 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getProperRetention = getProperRetention; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => setTimeout(resolve8, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8, reject) => { const crc64 = new crc64_1.default(); const md5 = crypto_1.default.createHash("md5"); @@ -114137,7 +122195,7 @@ var require_status_reporter = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StatusReporter = void 0; - var core_1 = require_core(); + var core_1 = require_core5(); var StatusReporter = class { constructor(displayFrequencyInMilliseconds) { this.totalNumberOfFilesToProcess = 0; @@ -114183,7 +122241,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils7(); + var utils_1 = require_utils11(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -114215,7 +122273,7 @@ var require_http_manager = __commonJS({ var require_upload_gzip = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-gzip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114228,21 +122286,21 @@ var require_upload_gzip = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -114269,7 +122327,7 @@ var require_upload_gzip = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -114290,8 +122348,8 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs17 = __importStar4(require("fs")); - var zlib3 = __importStar4(require("zlib")); + var fs17 = __importStar2(require("fs")); + var zlib3 = __importStar2(require("zlib")); var util_1 = require("util"); var stat = (0, util_1.promisify)(fs17.stat); var gzipExemptFileExtensions = [ @@ -114319,7 +122377,7 @@ var require_upload_gzip = __commonJS({ // 7ZIP ]; function createGZipFileOnDisk(originalFilePath, tempFilePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const gzipExemptExtension of gzipExemptFileExtensions) { if (originalFilePath.endsWith(gzipExemptExtension)) { return Number.MAX_SAFE_INTEGER; @@ -114330,7 +122388,7 @@ var require_upload_gzip = __commonJS({ const gzip = zlib3.createGzip(); const outputStream = fs17.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); - outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { + outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; resolve8(size); })); @@ -114343,15 +122401,15 @@ var require_upload_gzip = __commonJS({ } exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; const inputStream = fs17.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); inputStream.pipe(gzip); const chunks = []; try { - for (var _d = true, gzip_1 = __asyncValues4(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { + for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { _c = gzip_1_1.value; _d = false; try { @@ -114382,7 +122440,7 @@ var require_upload_gzip = __commonJS({ var require_requestUtils2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114395,21 +122453,21 @@ var require_requestUtils2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -114438,11 +122496,11 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils7(); - var core18 = __importStar4(require_core()); + var utils_1 = require_utils11(); + var core18 = __importStar2(require_core5()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let response = void 0; let statusCode = void 0; let isRetryable = false; @@ -114487,7 +122545,7 @@ var require_requestUtils2 = __commonJS({ } exports2.retry = retry3; function retryHttpClientRequest(name, method, customErrorMessages = /* @__PURE__ */ new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield retry3(name, method, customErrorMessages, maxAttempts); }); } @@ -114499,7 +122557,7 @@ var require_requestUtils2 = __commonJS({ var require_upload_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114512,21 +122570,21 @@ var require_upload_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -114555,17 +122613,17 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs17 = __importStar4(require("fs")); - var core18 = __importStar4(require_core()); - var tmp = __importStar4(require_tmp_promise()); - var stream2 = __importStar4(require("stream")); - var utils_1 = require_utils7(); + var fs17 = __importStar2(require("fs")); + var core18 = __importStar2(require_core5()); + var tmp = __importStar2(require_tmp_promise()); + var stream2 = __importStar2(require("stream")); + var utils_1 = require_utils11(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); var perf_hooks_1 = require("perf_hooks"); var status_reporter_1 = require_status_reporter(); - var http_client_1 = require_lib9(); + var http_client_1 = require_lib7(); var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils2(); @@ -114581,7 +122639,7 @@ var require_upload_http_client = __commonJS({ * @returns The response from the Artifact Service if the file container was successfully created */ createArtifactInFileContainer(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const parameters = { Type: "actions_storage", Name: artifactName @@ -114604,7 +122662,7 @@ var require_upload_http_client = __commonJS({ `The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter2(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages); const body = yield response.readBody(); @@ -114618,7 +122676,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of all the files uploaded in bytes */ uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); core18.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); @@ -114648,7 +122706,7 @@ var require_upload_http_client = __commonJS({ let abortPendingFileUploads = false; this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length); this.statusReporter.start(); - yield Promise.all(parallelUploads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < filesToUpload.length) { const currentFileParameters = parameters[currentFile]; currentFile += 1; @@ -114691,7 +122749,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of the file that was uploaded in bytes along with any failed uploads */ uploadFileAsync(httpClientIndex, parameters) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileStat = yield stat(parameters.file); const totalFileSize = fileStat.size; const isFIFO = fileStat.isFIFO(); @@ -114792,10 +122850,10 @@ var require_upload_http_client = __commonJS({ * @returns if the chunk was successfully uploaded */ uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const digest = yield (0, utils_1.digestForStream)(openStream()); const headers = (0, utils_1.getUploadHeaders)("application/octet-stream", true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest); - const uploadChunkRequest = () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.uploadHttpManager.getClient(httpClientIndex); return yield client.sendStream("PUT", resourceUrl, openStream(), headers); }); @@ -114812,7 +122870,7 @@ var require_upload_http_client = __commonJS({ } return false; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { core18.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); @@ -114861,7 +122919,7 @@ var require_upload_http_client = __commonJS({ * Updating the size indicates that we are done uploading all the contents of the artifact */ patchArtifactSize(size, artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)()); resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; @@ -114875,7 +122933,7 @@ var require_upload_http_client = __commonJS({ `An Artifact with the name ${artifactName} was not found` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter2(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); @@ -114891,7 +122949,7 @@ var require_upload_http_client = __commonJS({ var require_download_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -114904,21 +122962,21 @@ var require_download_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -114947,10 +123005,10 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs17 = __importStar4(require("fs")); - var core18 = __importStar4(require_core()); - var zlib3 = __importStar4(require("zlib")); - var utils_1 = require_utils7(); + var fs17 = __importStar2(require("fs")); + var core18 = __importStar2(require_core5()); + var zlib3 = __importStar2(require("zlib")); + var utils_1 = require_utils11(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -114966,11 +123024,11 @@ var require_download_http_client = __commonJS({ * Gets a list of all artifacts that are in a specific container */ listArtifacts() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactUrl = (0, utils_1.getArtifactUrl)(); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter2(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); })); const body = yield response.readBody(); @@ -114983,12 +123041,12 @@ var require_download_http_client = __commonJS({ * @param containerUrl the artifact container URL for the run */ getContainerItems(artifactName, containerUrl) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL(containerUrl); resourceUrl.searchParams.append("itemPath", artifactName); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter2(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); })); const body = yield response.readBody(); @@ -115000,7 +123058,7 @@ var require_download_http_client = __commonJS({ * @param downloadItems information about what items to download and where to save them */ downloadSingleArtifact(downloadItems) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); core18.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; @@ -115009,7 +123067,7 @@ var require_download_http_client = __commonJS({ core18.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); - yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelDownloads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < downloadItems.length) { const currentFileToDownload = downloadItems[currentFile]; currentFile += 1; @@ -115035,19 +123093,19 @@ var require_download_http_client = __commonJS({ * @param downloadPath destination location for the file being downloaded */ downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); let destinationStream = fs17.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); - const makeDownloadRequest = () => __awaiter4(this, void 0, void 0, function* () { + const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); return yield client.get(artifactLocation, headers); }); const isGzip = (incomingHeaders) => { return "content-encoding" in incomingHeaders && incomingHeaders["content-encoding"] === "gzip"; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { retryCount++; if (retryCount > retryLimit) { return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${artifactLocation}`)); @@ -115071,7 +123129,7 @@ var require_download_http_client = __commonJS({ } return parseInt(expected) === received; }; - const resetDestinationStream = (fileDownloadPath) => __awaiter4(this, void 0, void 0, function* () { + const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); yield new Promise((resolve8) => { destinationStream.on("close", resolve8); @@ -115124,7 +123182,7 @@ var require_download_http_client = __commonJS({ * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it */ pipeResponseToFile(response, destinationStream, isGzip) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield new Promise((resolve8, reject) => { if (isGzip) { const gunzip = zlib3.createGunzip(); @@ -115168,7 +123226,7 @@ var require_download_http_client = __commonJS({ var require_download_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -115181,23 +123239,23 @@ var require_download_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path15 = __importStar4(require("path")); + var path15 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { @@ -115234,7 +123292,7 @@ var require_download_specification = __commonJS({ var require_artifact_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/artifact-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -115247,21 +123305,21 @@ var require_artifact_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve8) { resolve8(value); @@ -115290,10 +123348,10 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core18 = __importStar4(require_core()); + var core18 = __importStar2(require_core5()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils7(); + var utils_1 = require_utils11(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -115310,7 +123368,7 @@ var require_artifact_client = __commonJS({ * Uploads an artifact */ uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core18.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); @@ -115354,7 +123412,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadArtifact(name, path15, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { @@ -115388,7 +123446,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadAllArtifacts(path15) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); @@ -115442,1103 +123500,6 @@ var require_artifact_client2 = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core18 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core18.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core18.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core18.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core18.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core18.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; - } - exports2.getOptions = getOptions; - } -}); - -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname3(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path15.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname3; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path15.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { - return p; - } - if (p === path15.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; - } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; - } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path15 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path15.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path15.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } - } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path15.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path15.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { - homedir = homedir || os3.homedir(); - (0, assert_1.default)(homedir, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = _Pattern.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path15, level) { - this.path = path15; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path15 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core18.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs17.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs17.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core18.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs17.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core18.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto = __importStar4(require("crypto")); - var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path15 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core18.info : core18.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs17.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash2 = crypto.createHash("sha256"); - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs17.createReadStream(file), hash2); - result.write(hash2.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create3; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create3(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - // src/sarif-schema-2.1.0.json var require_sarif_schema_2_1_0 = __commonJS({ "src/sarif-schema-2.1.0.json"(exports2, module2) { @@ -119444,14 +126405,14 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -123089,12 +130050,12 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -123879,7 +130840,7 @@ ${jsonContents}` } // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -124021,7 +130982,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -124180,7 +131141,7 @@ var os = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); @@ -125507,14 +132468,14 @@ var import_archiver = __toESM(require_archiver()); // src/analyze.ts var fs11 = __toESM(require("fs")); var path10 = __toESM(require("path")); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/autobuild.ts var core11 = __toESM(require_core()); // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; async function getDependencyCacheUsage(logger) { try { @@ -126399,13 +133360,13 @@ function fromString(str2, unsigned, radix) { return result; } Long.fromString = fromString; -function fromValue(val2, unsigned) { - if (typeof val2 === "number") return fromNumber(val2, unsigned); - if (typeof val2 === "string") return fromString(val2, unsigned); +function fromValue(val, unsigned) { + if (typeof val === "number") return fromNumber(val, unsigned); + if (typeof val === "string") return fromString(val, unsigned); return fromBits( - val2.low, - val2.high, - typeof unsigned === "boolean" ? unsigned : val2.unsigned + val.low, + val.high, + typeof unsigned === "boolean" ? unsigned : val.unsigned ); } Long.fromValue = fromValue; @@ -126477,8 +133438,8 @@ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val2 = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) if ((val2 & 1 << bit) != 0) break; + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; LongPrototype.isSafeInteger = function isSafeInteger() { @@ -127098,7 +134059,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io6 = __toESM(require_io2()); +var io6 = __toESM(require_io()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/init-action.js b/lib/init-action.js index 006379abd..ecb629400 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os5 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os5 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os5.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto2 = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); - var os5 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto3 = __importStar2(require("crypto")); + var fs15 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto3.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto2 === void 0) { + if (crypto3 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto2 = require("node:crypto"); - random = (max) => crypto2.randomInt(0, max); + const crypto3 = require("node:crypto"); + random = (max) => crypto3.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve9({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto2.randomBytes(16).toString("base64"); + const keyValue = crypto3.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto3.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto2; + var crypto3; try { - crypto2 = require("crypto"); + crypto3 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto2.randomBytes(4); + this.maskKey = crypto3.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path16 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path16 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path16.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs15 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs15.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs15.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path16.dirname(filePath); const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path16.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which7; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os5 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path16 = __importStar4(require("path")); - var io7 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable6; + exports2.setSecret = setSecret; + exports2.addPath = addPath2; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug3; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning11; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup4; + exports2.endGroup = endGroup4; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable6(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable6; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath2(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath2; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os5.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput2; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug3() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug3; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning11(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning11; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os5.EOL); } - exports2.info = info6; function startGroup4(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup4; function endGroup4() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup4; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup4(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,465 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); - } -}); - -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs15.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which7; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } + exports2.platform = __importStar2(require_platform()); } }); @@ -22349,7 +22063,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -22362,21 +22076,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -22405,10 +22119,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -22483,8 +22197,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -22496,8 +22210,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -22554,42 +22268,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -22598,14 +22312,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -22614,7 +22328,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -22623,7 +22337,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -22637,7 +22351,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -22711,7 +22425,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9, reject) => { function callbackForResult(err, res) { if (err) { @@ -22898,15 +22612,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -22968,7 +22682,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -22981,21 +22695,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -23024,7 +22738,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -23047,7 +22761,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -27522,7 +27236,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -27535,24 +27249,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -27582,7 +27296,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -27595,23 +27309,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30699,11 +30413,1440 @@ var require_db_config_schema = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os5 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os5.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto3 = __importStar2(require("crypto")); + var fs15 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs15.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs15.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve9(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve9(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve9(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve9(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve9(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path16 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path16.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30712,28 +31855,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs15 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs15.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os5.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os5.EOL.length); + n = s.indexOf(os5.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os5.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve9(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath2(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath2; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os5.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug3() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug3; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning11(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning11; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os5.EOL); + } + exports2.info = info6; + function startGroup4(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup4; + function endGroup4() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup4; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup4(name); + let result; + try { + result = yield fn(); + } finally { + endGroup4(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30744,10 +33253,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30755,40 +33272,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path16 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { p = safeTrimTrailingSeparator(p); @@ -30803,15 +33324,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30826,11 +33347,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path16.sep; @@ -30839,7 +33360,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30848,7 +33369,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30886,9 +33407,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30898,40 +33419,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31775,41 +34300,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path16 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31819,7 +34348,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path16.sep); @@ -31835,17 +34364,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31872,42 +34401,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31920,9 +34453,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31989,17 +34522,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir2) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { homedir2 = homedir2 || os5.homedir(); - assert_1.default(homedir2, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); + (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -32073,9 +34606,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -32089,34 +34622,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -32143,7 +34680,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32162,10 +34699,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32186,7 +34723,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32200,11 +34737,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core2()); + var fs15 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path16 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32219,19 +34756,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32240,7 +34779,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32253,7 +34792,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs15.promises.lstat(searchPath)); + yield __await2(fs15.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32270,24 +34809,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32296,7 +34838,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32315,7 +34857,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32352,11 +34894,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve9, reject) { + v = o[n](v), settle(resolve9, reject, v.done, v.value); + }); + }; + } + function settle(resolve9, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve9({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto3 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core2()); + var fs15 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path16 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto3.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs15.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto3.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs15.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -32384,435 +35066,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create2(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create2; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create2(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -34009,7 +36282,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -34022,21 +36295,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -34063,7 +36346,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -34083,20 +36366,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io3()); - var crypto2 = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - var semver9 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob()); + var io7 = __importStar2(require_io()); + var crypto3 = __importStar2(require("crypto")); + var fs15 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + var semver9 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -34112,27 +36404,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path16.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto2.randomUUID()); + const dest = path16.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs15.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34156,15 +36446,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs15.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34186,7 +36474,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver9.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -34197,13 +36485,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs15.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34211,14 +36497,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io7.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34228,9 +36512,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto3.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34238,1772 +36521,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve9(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve9(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve9(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve9(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve9(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os5 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os5.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve9, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve9(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve9) => { - token = setTimeout(resolve9, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -36031,6 +36552,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36355,7 +36877,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36431,9 +36953,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path16, preserveJsx) { + if (typeof path16 === "string" && /^\.\.?\//.test(path16)) { + return path16.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path16; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36443,7 +36973,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36470,6 +37000,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36480,6 +37018,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36501,400 +37043,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os5 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os5.arch()}-${os5.type()}-${os5.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36908,295 +37065,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve9, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve9(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37209,6 +37368,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37232,8 +37392,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37284,21 +37443,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve9) => { + const handler = () => { + resolve9(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve9, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve9) : node_https_1.default.request(options, resolve9); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve9, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve9(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve9, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve9(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37307,7 +38861,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37342,7 +38896,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37351,7 +38905,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37381,16 +38935,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37543,8 +39097,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37649,11 +39203,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -38057,17 +39611,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -38139,7 +39693,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38152,24 +39706,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -38206,10 +39760,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38222,29 +39776,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38365,12 +39919,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve9, reject) => { @@ -38458,10 +40012,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38474,30 +40028,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -38608,10 +40162,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38624,30 +40178,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38737,18 +40291,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38779,7 +40333,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38798,7 +40352,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38833,7 +40387,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38876,8 +40430,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38889,6 +40442,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning11 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning11); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning11); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path16, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path16, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve9, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve9(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve9) => { + token = setTimeout(resolve9, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38911,24 +42474,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38938,7 +42509,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38953,8 +42525,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38993,7 +42565,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -39006,10 +42581,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -39029,18 +42605,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -39049,14 +42622,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -39064,7 +42641,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -39101,12 +42678,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -39122,54 +42698,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39181,24 +42720,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39212,7 +42750,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39280,9 +42818,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39291,41 +42831,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39337,425 +42942,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib2 = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve9) => { - const handler = () => { - resolve9(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve9, reject) => { - const req = isInsecure ? http.request(options, resolve9) : https2.request(options, resolve9); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib2.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib2.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve9, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve9(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39767,7 +43064,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39781,7 +43078,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39794,7 +43091,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39803,7 +43100,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39816,14 +43116,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39834,14 +43133,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39882,32 +43180,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39939,22 +43261,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39965,6 +43326,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -40001,17 +43386,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -40055,46 +43439,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -40108,21 +43492,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -40132,28 +43516,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40164,25 +43548,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40210,6 +43594,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40220,509 +43611,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40730,6 +43618,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40770,7 +43659,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40784,8 +43673,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40843,8 +43734,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40890,7 +43782,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40899,7 +43799,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40938,7 +43838,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40949,514 +43851,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41465,24 +43862,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41498,52 +43894,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41560,7 +43968,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41569,12 +43976,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41640,12 +44050,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41709,14 +44118,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41779,7 +44187,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41933,7 +44340,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41942,7 +44348,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41950,7 +44356,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41988,7 +44394,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -42006,7 +44412,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -42047,7 +44453,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -42093,7 +44502,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -42107,8 +44516,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -42147,7 +44555,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42230,7 +44638,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42240,7 +44647,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42268,7 +44675,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42277,7 +44683,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42332,7 +44738,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42378,7 +44785,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42411,7 +44817,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42420,25 +44825,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42449,17 +44854,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42467,7 +44871,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42484,7 +44888,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42525,7 +44929,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42537,18 +44940,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42582,8 +44985,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42621,7 +45023,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42633,7 +45036,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42646,7 +45048,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42655,7 +45056,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42667,8 +45071,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42677,9 +45081,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42696,24 +45098,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42738,7 +45138,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42758,7 +45158,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42783,16 +45182,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42805,7 +45204,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42814,8 +45212,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42823,16 +45221,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42862,7 +45260,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42871,9 +45268,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42916,10 +45312,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -43028,17 +45423,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -43049,31 +45443,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -43147,16 +45561,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43168,7 +45582,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43193,18 +45610,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43225,10 +45642,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43263,11 +45679,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43305,7 +45724,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43320,7 +45739,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43336,7 +45755,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43377,8 +45796,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43403,7 +45825,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43411,10 +45835,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43430,6 +45852,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43439,7 +45863,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43470,7 +45894,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43482,15 +45908,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43619,14 +46044,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43648,13 +46074,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43663,10 +46089,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43677,17 +46106,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43701,8 +46129,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43710,7 +46137,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43729,7 +46159,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43767,7 +46198,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43776,7 +46206,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43787,12 +46217,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43826,1680 +46255,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt2, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt2(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt2.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt2.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt2.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt2.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt2.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45537,7 +47123,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45571,7 +47157,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45593,6 +47179,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45610,7 +47207,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45622,1193 +47219,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve9, reject) => { - this.resolve = resolve9; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve9) => setTimeout(() => resolve9(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto2 = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs15 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs15); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46834,17 +47253,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46853,14 +47282,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46886,16 +47315,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46993,7 +47422,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -47028,9 +47457,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -47052,8 +47481,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path16 = urlParsed.pathname; path16 = path16 || "/"; path16 = escape(path16); @@ -47085,7 +47561,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -47140,15 +47616,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(url, name) { + const urlParsed = new URL(url); 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(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47167,34 +47643,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47206,8 +47681,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -47228,8 +47703,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47244,7 +47719,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47292,11 +47770,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47313,31 +47811,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47346,12 +47844,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47432,6 +47930,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47443,25 +47945,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47517,22 +48033,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47540,15 +48092,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47573,21 +48125,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47605,10 +48157,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47621,9 +48173,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47631,16 +48183,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47656,21 +48221,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47685,10 +48269,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47707,6 +48302,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -48130,7 +48735,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -48147,31 +48769,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48181,7 +48803,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48201,10 +48823,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48225,10 +48847,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path16}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48248,6 +48870,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48259,7 +48891,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48277,7 +48930,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48285,10 +48938,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto2.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48300,7 +48964,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48308,44 +48984,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve9, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve9).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve9(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path16 = urlParsed.pathname; + path16 = path16 || "/"; + path16 = escape(path16); + urlParsed.pathname = path16; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path16 = urlParsed.pathname; + path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; + urlParsed.pathname = path16; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve9, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve9(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48361,71 +51047,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48437,61 +51134,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto2.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48499,12 +51210,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48520,10 +51231,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path16}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48543,14 +51254,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path16 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path16}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48567,17 +51638,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48586,24 +51671,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48612,6 +51741,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48635,9 +51772,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48660,7 +51798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48668,75 +51806,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48745,28 +51894,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48809,7 +51958,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48881,7 +52183,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48930,7 +52232,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48957,7 +52259,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48996,7 +52298,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -49048,7 +52350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -49086,7 +52388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -49099,6 +52401,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -49116,7 +52439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -49134,7 +52457,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49160,7 +52483,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49223,7 +52546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49271,7 +52594,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49383,7 +52706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49408,7 +52731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49473,7 +52796,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49523,7 +52846,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49557,7 +52880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49583,7 +52906,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49609,7 +52932,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49635,7 +52958,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49665,7 +52988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49729,7 +53052,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49754,7 +53077,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49841,7 +53164,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49866,7 +53189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50193,7 +53516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50264,7 +53587,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50303,7 +53626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50320,7 +53643,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50369,7 +53692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50408,7 +53731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50433,7 +53756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50477,7 +53800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50503,7 +53826,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50529,7 +53852,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50571,7 +53894,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50588,7 +53911,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50638,7 +53961,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50683,7 +54006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50700,7 +54023,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50726,7 +54049,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50765,7 +54088,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50802,7 +54125,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50818,7 +54141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50855,7 +54178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50871,7 +54194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50915,7 +54238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50931,7 +54254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50968,7 +54291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50984,7 +54307,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -51028,7 +54351,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -51044,7 +54367,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -51123,7 +54446,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -51139,7 +54462,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51183,7 +54506,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51199,7 +54522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51243,7 +54566,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51259,7 +54582,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51317,7 +54640,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51333,7 +54656,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51473,7 +54796,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51489,7 +54812,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51533,7 +54856,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51549,7 +54872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51607,7 +54930,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51623,7 +54946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51689,7 +55012,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51705,7 +55028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51763,7 +55086,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51779,7 +55102,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51823,7 +55146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51839,7 +55162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51883,7 +55206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51899,7 +55222,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51929,7 +55252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51945,7 +55268,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51982,7 +55305,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51998,7 +55321,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -52056,7 +55379,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -52072,7 +55395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -52123,7 +55446,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -52139,7 +55462,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52197,7 +55520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52213,7 +55536,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52271,7 +55594,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52287,7 +55610,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52345,7 +55668,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52361,7 +55684,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52412,7 +55735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52428,7 +55751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52479,7 +55802,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52495,7 +55818,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52567,7 +55890,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52583,7 +55906,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52923,7 +56246,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52939,7 +56262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53315,7 +56638,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53331,7 +56654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53375,7 +56698,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53391,7 +56714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53435,7 +56758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53451,7 +56774,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53502,7 +56825,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53518,7 +56841,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53583,7 +56906,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53599,7 +56922,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53651,7 +56974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53667,7 +56990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53704,7 +57027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53720,7 +57043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53764,7 +57087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53780,7 +57103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53866,7 +57189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53882,7 +57205,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53940,7 +57263,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53956,7 +57279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -54007,7 +57330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -54023,7 +57346,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -54081,7 +57404,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -54097,7 +57420,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54155,7 +57478,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54171,7 +57494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54229,7 +57552,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54245,7 +57568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54324,7 +57647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54340,7 +57663,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54420,7 +57743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54432,11 +57755,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54537,7 +57874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54549,11 +57886,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54597,7 +57948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54613,7 +57964,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54650,7 +58001,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54666,7 +58017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54738,7 +58089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54754,7 +58105,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -55014,7 +58365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -55030,7 +58381,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -55074,7 +58425,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -55090,7 +58441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -55134,7 +58485,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -55150,7 +58501,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55243,7 +58594,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55259,7 +58610,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55359,7 +58710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55375,7 +58726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55454,7 +58805,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55470,7 +58821,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55563,7 +58914,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55575,11 +58926,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55644,7 +59009,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55660,7 +59025,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55725,7 +59090,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55741,7 +59106,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55806,7 +59171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55822,7 +59187,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55887,7 +59252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55903,7 +59268,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55976,7 +59341,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55992,7 +59357,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -56085,7 +59450,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -56101,7 +59466,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56208,7 +59573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56224,7 +59589,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56324,7 +59689,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56336,11 +59701,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56398,7 +59777,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56414,7 +59793,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56507,7 +59886,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56523,7 +59902,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56616,7 +59995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56628,11 +60007,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56711,7 +60104,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56727,7 +60120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56806,7 +60199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56818,11 +60211,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56922,7 +60329,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56938,7 +60345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -57010,7 +60417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -57026,189 +60433,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57219,11 +60456,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57234,7 +60471,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57246,7 +60483,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57257,7 +60494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57268,7 +60505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57281,10 +60518,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57292,7 +60529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57302,7 +60539,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57313,7 +60550,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57324,7 +60561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57335,7 +60572,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57345,7 +60582,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57355,7 +60592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57368,7 +60605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57386,11 +60623,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57401,7 +60638,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57412,7 +60649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57423,7 +60660,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57434,7 +60671,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57445,7 +60682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57456,7 +60693,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57467,7 +60704,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57477,7 +60714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57488,7 +60725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57525,7 +60762,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57539,7 +60776,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57549,7 +60786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57559,7 +60796,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57569,7 +60806,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57580,7 +60817,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57591,7 +60828,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57609,7 +60846,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57620,7 +60857,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57630,7 +60867,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57640,7 +60877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57651,7 +60888,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57662,7 +60899,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57672,7 +60909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57683,7 +60920,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57694,7 +60931,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57704,7 +60941,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57714,7 +60951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57725,7 +60962,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57736,7 +60973,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57747,7 +60984,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57758,7 +60995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57768,7 +61005,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57790,7 +61027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57819,7 +61056,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57830,7 +61067,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57840,7 +61077,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57850,7 +61087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57860,7 +61097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57870,7 +61107,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57880,7 +61117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57890,7 +61127,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57900,7 +61137,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57910,7 +61147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57920,7 +61157,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57930,7 +61167,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57940,7 +61177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57951,7 +61188,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57961,7 +61198,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57972,7 +61209,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57983,7 +61220,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57993,7 +61230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -58003,7 +61240,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -58013,7 +61250,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -58023,7 +61260,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -58033,7 +61270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -58064,7 +61301,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -58074,7 +61311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -58085,7 +61322,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -58096,7 +61333,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -58107,7 +61344,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -58117,7 +61354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -58128,7 +61365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58155,7 +61392,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58166,7 +61403,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58180,7 +61417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58194,7 +61431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58204,7 +61441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58218,7 +61455,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58228,7 +61465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58239,7 +61476,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58249,7 +61486,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58259,7 +61496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58269,7 +61506,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58280,7 +61517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58290,7 +61527,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58300,7 +61537,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58311,7 +61548,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58322,7 +61569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58333,7 +61580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58344,7 +61591,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58355,7 +61602,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58383,11 +61630,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58409,11 +61656,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58433,7 +61680,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58444,7 +61691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58488,7 +61735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58499,7 +61746,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58510,7 +61757,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58521,7 +61768,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58535,7 +61782,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58549,7 +61796,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58563,7 +61810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58574,7 +61821,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58585,7 +61832,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58596,7 +61843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58606,7 +61853,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58617,7 +61864,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58628,7 +61875,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58638,7 +61885,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58648,7 +61895,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58660,7 +61907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58671,7 +61918,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58682,7 +61929,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58693,7 +61940,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58703,7 +61950,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58717,7 +61964,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58727,7 +61974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58738,7 +61985,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58749,7 +61996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58759,7 +62006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58770,7 +62017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58781,11 +62028,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58796,7 +62043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58809,7 +62056,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58823,8 +62084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58832,7 +62093,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58856,15 +62117,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58874,8 +62135,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58884,10 +62145,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58897,173 +62159,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -59072,58 +62334,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -59137,7 +62413,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -59145,7 +62421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59153,14 +62429,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59190,8 +62466,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59201,8 +62477,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59218,7 +62494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59226,8 +62502,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59235,8 +62511,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59244,7 +62520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59255,8 +62531,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59273,124 +62549,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59409,117 +62686,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59530,304 +62807,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59881,8 +63172,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59910,8 +63201,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59935,8 +63226,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59944,8 +63235,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59956,8 +63247,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59982,8 +63273,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59994,8 +63285,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -60004,8 +63295,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -60016,8 +63307,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -60049,7 +63340,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -60063,651 +63355,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60718,112 +64026,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60838,8 +64160,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60847,16 +64169,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60869,8 +64191,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60894,8 +64216,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60904,8 +64226,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60919,358 +64241,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61283,8 +64621,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61294,8 +64632,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61306,8 +64644,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61318,7 +64656,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61328,161 +64667,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61499,8 +64853,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61515,8 +64869,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61527,8 +64881,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61540,8 +64894,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61554,8 +64908,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61564,11 +64918,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61578,47 +64933,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61630,51 +64985,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61684,33 +65040,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61722,38 +65078,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61763,45 +65120,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61813,41 +65170,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61856,67 +65241,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62009,6 +65539,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -62053,22 +65627,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62173,12 +65742,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62225,7 +65846,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62242,18 +65886,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto2.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62268,8 +66050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62300,19 +66082,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62379,13 +66161,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62400,10 +66182,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62463,38 +66245,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62515,18 +66320,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62537,7 +66342,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62560,18 +66365,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62584,7 +66389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62607,18 +66412,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62632,7 +66437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62655,23 +66460,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62684,7 +66489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62707,27 +66512,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62740,7 +66545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62763,27 +66568,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62797,7 +66602,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62809,47 +66675,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62871,7 +66754,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62881,34 +66764,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62916,73 +66800,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62990,32 +66877,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -63028,52 +66937,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -63099,12 +66962,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63531,7 +67451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63539,6 +67459,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63550,13 +67472,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63565,8 +67506,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63578,19 +67519,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63599,7 +67540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63611,17 +67552,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -63630,59 +67571,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63739,7 +67681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63779,87 +67721,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63873,13 +67831,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63889,31 +67872,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63925,49 +67908,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63980,8 +67986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -64035,7 +68040,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -64044,11 +68088,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -64136,6 +68179,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64473,7 +68528,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64481,6 +68536,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64489,52 +68546,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64544,27 +68624,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve9, reject) => { + this.resolve = resolve9; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve9) => setTimeout(() => resolve9(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64572,20 +69826,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64593,10 +69848,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64636,12 +69891,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64651,27 +69915,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64741,333 +70039,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve9, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve9).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve9(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve9, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve9(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -65075,28 +70076,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve9(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve9, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -65107,18 +70108,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve9(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve9, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve9(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve9, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -65129,9 +70142,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -65147,49 +70199,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65198,8 +70250,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65208,8 +70260,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65239,7 +70291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65248,76 +70300,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65325,8 +70407,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65334,9 +70415,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65345,7 +70426,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65362,9 +70446,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65375,7 +70459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65385,7 +70469,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65396,17 +70480,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65414,19 +70506,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65436,19 +70530,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65458,13 +70560,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65475,7 +70577,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65487,14 +70589,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65505,22 +70609,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65536,15 +70642,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65554,15 +70662,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65573,24 +70688,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65611,57 +70728,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65669,15 +70787,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65689,14 +70807,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65706,36 +70824,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65746,31 +70867,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65778,12 +70900,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65794,26 +70916,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65827,8 +70952,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65836,7 +70961,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65856,10 +70981,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65874,7 +71002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65902,21 +71030,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65924,12 +71054,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65941,18 +71071,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve9) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve9(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve9((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65961,17 +71097,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve9) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve9((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65979,8 +71165,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65991,8 +71177,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -66005,8 +71191,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -66016,60 +71202,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -66080,40 +71271,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66121,20 +71327,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66147,20 +71364,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66169,29 +71388,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66206,7 +71440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66220,74 +71454,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66299,8 +71548,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66309,15 +71558,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66333,26 +71599,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66370,7 +71638,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66381,32 +71649,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66431,22 +71715,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66454,10 +71753,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66475,7 +71774,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66492,18 +71791,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66514,30 +71814,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66545,20 +71847,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66587,18 +71891,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66625,7 +71929,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66646,23 +71950,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66672,32 +71975,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66723,15 +72026,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66750,27 +72056,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66788,50 +72094,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66842,13 +72156,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66856,23 +72170,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66881,21 +72197,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66903,7 +72231,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66911,19 +72239,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66936,7 +72266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66947,32 +72277,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66981,13 +72314,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66997,7 +72332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67006,16 +72341,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -67023,22 +72360,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -67058,17 +72397,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67077,94 +72414,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67190,13 +72512,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67206,17 +72531,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67225,7 +72552,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67233,20 +72560,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67267,17 +72596,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67287,94 +72614,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67383,7 +72704,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67401,13 +72724,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67415,24 +72741,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67440,12 +72768,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67453,22 +72783,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67478,38 +72810,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67520,15 +72886,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67540,18 +72906,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67571,7 +72937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67586,7 +72952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67601,6 +72967,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67640,6 +73016,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve9(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67656,11 +73034,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67684,13 +73087,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67702,13 +73105,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67717,28 +73120,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67746,24 +73149,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67776,9 +73187,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67787,19 +73198,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67808,23 +73219,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path16 = getURLPath(subRequest.url); + const path16 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path16 || path16 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67835,7 +73246,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67852,7 +73263,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67863,7 +73274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67874,18 +73285,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path16 = (0, utils_common_js_1.getURLPath)(url); if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67897,10 +73326,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67911,7 +73340,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67929,11 +73358,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67941,17 +73384,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67960,10 +73418,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67980,7 +73440,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67989,48 +73477,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -68038,34 +73526,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -68082,7 +73588,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -68104,7 +73610,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -68112,7 +73618,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -68122,15 +73628,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -68138,12 +73656,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68156,14 +73674,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68171,8 +73693,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68183,19 +73705,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68207,24 +73736,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68237,7 +73766,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68245,8 +73774,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68295,29 +73824,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68332,7 +73861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68346,7 +73875,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68356,10 +73885,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68371,14 +73900,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68391,18 +73920,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68411,23 +73960,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68443,44 +74015,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68488,64 +74042,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68553,41 +74106,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68606,7 +74162,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68623,17 +74182,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68641,35 +74198,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68677,118 +74221,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68806,7 +74370,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68827,23 +74394,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68863,18 +74434,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68885,27 +74454,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68915,53 +74468,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68969,11 +74523,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68985,7 +74538,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69004,7 +74559,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69013,14 +74571,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69032,7 +74590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -69052,18 +74610,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve9) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve9(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve9((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -69072,45 +74633,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve9) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve9((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69214,6 +74808,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69221,7 +74867,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69268,12 +74914,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69299,10 +74950,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69319,13 +74982,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69354,6 +75021,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69375,44 +75058,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69423,22 +75124,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69453,35 +75182,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69492,22 +75221,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69524,7 +75262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69538,47 +75276,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69587,15 +75307,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69605,14 +75325,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69623,14 +75343,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69638,7 +75358,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69650,9 +75370,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69673,23 +75399,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69709,18 +75439,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69731,27 +75459,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69759,57 +75471,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69821,7 +75529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69833,7 +75541,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69852,7 +75562,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69868,45 +75581,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69914,45 +75609,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69974,7 +75665,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69986,17 +75677,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -70015,7 +75709,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -70025,16 +75722,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -70048,19 +75745,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -70068,7 +75773,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -70076,21 +75781,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -70098,7 +75804,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -70106,66 +75812,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70250,7 +76014,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70263,21 +76027,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -70305,9 +76079,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70390,15 +76165,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70417,7 +76194,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70425,7 +76201,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70438,21 +76214,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -70480,9 +76266,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70490,14 +76281,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70509,14 +76298,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9) => setTimeout(resolve9, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70553,9 +76341,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70579,13 +76366,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70593,7 +76522,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70606,21 +76535,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -70648,20 +76587,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs15 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs15 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -70763,10 +76705,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs15.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70786,17 +76728,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs15.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70813,7 +76754,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70826,7 +76767,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70850,9 +76791,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70873,8 +76813,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70890,8 +76830,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70935,8 +76875,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve9) => { timeoutHandle = setTimeout(() => resolve9("timeout"), timeoutMs); @@ -70953,7 +76892,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70966,23 +76905,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -71007,7 +76957,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -71049,7 +76998,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -71058,7 +77006,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -71067,13 +77017,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -71085,7 +77033,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -71094,7 +77041,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -71131,22 +77078,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71157,12 +77108,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71170,7 +77120,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71183,21 +77133,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -71225,13 +77185,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs15 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs15 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71264,11 +77227,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71291,11 +77254,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71312,7 +77274,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71328,9 +77290,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71338,24 +77299,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71364,7 +77324,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs15.openSync(archivePath, "r"); @@ -71375,7 +77335,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71398,15 +77358,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71428,7 +77388,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -73023,26 +78982,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -73051,22 +79010,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -73080,10 +79039,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73288,26 +79247,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73319,26 +79278,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73588,7 +79547,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73601,13 +79560,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73619,19 +79578,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73736,8 +79695,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74307,18 +80266,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74509,7 +80468,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74618,7 +80577,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74626,7 +80585,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74640,7 +80599,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74732,9 +80691,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74755,7 +80714,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74904,7 +80863,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -74951,7 +80910,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74973,7 +80932,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -75022,7 +80981,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75043,7 +81002,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -75091,7 +81050,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -75112,7 +81071,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -75160,7 +81119,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75180,7 +81139,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -75210,7 +81169,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75284,7 +81243,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75454,7 +81413,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75578,7 +81537,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75664,11 +81623,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75740,11 +81699,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75806,17 +81765,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76291,7 +82250,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76359,11 +82318,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -76379,7 +82339,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76392,7 +82351,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76400,7 +82358,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -76428,16 +82386,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76461,14 +82419,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -76478,7 +82436,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76549,7 +82507,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9) => setTimeout(resolve9, milliseconds)); }); } @@ -76569,7 +82527,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76577,7 +82534,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76590,21 +82547,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -76632,16 +82599,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io7 = __importStar4(require_io3()); + var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path16 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path16 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76673,8 +82642,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76704,8 +82673,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76727,7 +82696,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76751,7 +82720,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76776,7 +82745,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76790,37 +82759,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io7.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76833,21 +82799,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -76875,15 +82851,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path16 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var path16 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76932,9 +82911,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76947,9 +82925,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -77006,8 +82983,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -77078,8 +83055,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -77093,10 +83070,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77157,8 +83133,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77244,81 +83220,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core14.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; } - exports2.getOptions = getOptions; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77331,1573 +83269,137 @@ var require_internal_path_helper2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname3(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path16.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname3; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path16.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { - return p; - } - if (p === path16.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; + exports2.issue = exports2.issueCommand = void 0; + var os5 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os5.EOL); } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path16.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path16.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; } + this.command = command; + this.properties = properties; + this.message = message; } - /** - * Converts the path to it's string representation - */ toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path16.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir2) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir2); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir2) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { - homedir2 = homedir2 || os5.homedir(); - (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); - pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path16, level) { - this.path = path16; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs15.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs15.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs15.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto2 = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path16 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto2.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs15.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto2.createHash("sha256"); - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs15.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create2(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create2; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create2(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path16.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path16.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which7(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which7(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which7; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path16.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver9 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os5 = require("os"); - var cp = require("child_process"); - var fs15 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os5.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver9.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; } else { - chk = semver9.satisfies(osVersion, item.platform_version); + cmdStr += ","; } + cmdStr += `${key}=${escapeProperty(val)}`; } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; } } } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto3 = __importStar2(require("crypto")); + var fs15 = __importStar2(require("fs")); + var os5 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs15.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs15.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os5.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto3.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs15.existsSync(lsbReleaseFile)) { - contents = fs15.readFileSync(lsbReleaseFile).toString(); - } else if (fs15.existsSync(osReleaseFile)) { - contents = fs15.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os5.EOL}${convertedValue}${os5.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -78987,7 +83489,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -79000,21 +83502,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -79043,10 +83545,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -79121,8 +83623,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -79134,8 +83636,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -79192,42 +83694,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -79236,14 +83738,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -79252,7 +83754,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -79261,7 +83763,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -79275,7 +83777,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -79349,7 +83851,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9, reject) => { function callbackForResult(err, res) { if (err) { @@ -79536,15 +84038,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -79602,11 +84104,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -79619,21 +84617,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path16 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path16.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs15 = __importStar2(require("fs")); + var path16 = __importStar2(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs15.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path16 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os5 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path16 = __importStar2(require("path")); + var io7 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os5.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os5.EOL.length); + n = s.indexOf(os5.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io7.which(this.toolPath, true); + return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os5.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve9(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath2(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath2; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os5.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug3() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug3; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning11(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning11; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os5.EOL); + } + exports2.info = info6; + function startGroup4(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup4; + function endGroup4() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup4; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup4(name); + let result; + try { + result = yield fn(); + } finally { + endGroup4(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver9 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os5 = require("os"); + var cp = require("child_process"); + var fs15 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os5.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver9.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver9.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os5.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs15.existsSync(lsbReleaseFile)) { + contents = fs15.readFileSync(lsbReleaseFile).toString(); + } else if (fs15.existsSync(osReleaseFile)) { + contents = fs15.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -79662,7 +86208,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -79676,7 +86222,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -79699,7 +86245,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve9) => setTimeout(resolve9, seconds * 1e3)); }); } @@ -79712,7 +86258,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -79725,21 +86271,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve9) { resolve9(value); @@ -79768,19 +86314,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io7 = __importStar4(require_io4()); - var crypto2 = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver9 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core3()); + var io7 = __importStar2(require_io3()); + var crypto3 = __importStar2(require("crypto")); + var fs15 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os5 = __importStar2(require("os")); + var path16 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver9 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -79794,8 +86340,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path16.join(_getTempDirectory(), crypto2.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path16.join(_getTempDirectory(), crypto3.randomUUID()); yield io7.mkdirP(path16.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); @@ -79803,7 +86349,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -79817,7 +86363,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs15.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -79859,7 +86405,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -79912,7 +86458,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -79956,7 +86502,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -79977,7 +86523,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -79992,7 +86538,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io7.which("pwsh", false); @@ -80038,7 +86584,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -80049,7 +86595,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver9.clean(version) || version; arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -80068,7 +86614,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver9.clean(version) || version; arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -80132,7 +86678,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -80167,23 +86713,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os5.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path16.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -80287,771 +86833,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve9(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve9(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve9(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve9) => setTimeout(() => resolve9(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve9(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve9(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -81079,7 +86862,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -81570,7 +87353,7 @@ var require_follow_redirects = __commonJS({ var fs14 = __toESM(require("fs")); var path15 = __toESM(require("path")); var core13 = __toESM(require_core()); -var io6 = __toESM(require_io2()); +var io6 = __toESM(require_io()); var semver8 = __toESM(require_semver2()); // node_modules/uuid/dist-node/stringify.js @@ -81633,7 +87416,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); @@ -81641,7 +87424,7 @@ var fsPromises = __toESM(require("fs/promises")); var os = __toESM(require("os")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -85235,7 +91018,7 @@ function wrapApiConfigurationError(e) { } // src/caching-utils.ts -var crypto = __toESM(require("crypto")); +var crypto2 = __toESM(require("crypto")); var core6 = __toESM(require_core()); async function getTotalCacheSize(paths, logger, quiet = false) { const sizes = await Promise.all( @@ -85271,7 +91054,7 @@ function getCachingKind(input) { var cacheKeyHashLength = 16; function createCacheKeyHash(components) { const componentsJson = JSON.stringify(components); - return crypto.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength); + return crypto2.createHash("sha256").update(componentsJson).digest("hex").substring(0, cacheKeyHashLength); } function getDependencyCachingEnabled() { const dependencyCaching = getOptionalInput("dependency-caching") || process.env["CODEQL_ACTION_DEPENDENCY_CACHING" /* DEPENDENCY_CACHING */]; @@ -85641,12 +91424,12 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path4 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -86572,7 +92355,7 @@ var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { // src/trap-caching.ts var fs5 = __toESM(require("fs")); var path6 = __toESM(require("path")); -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; var MAX_CACHE_OPERATION_MS2 = 12e4; @@ -87292,8 +93075,8 @@ function isCodeQualityEnabled(config) { // src/dependency-caching.ts var os2 = __toESM(require("os")); var import_path = require("path"); -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob2()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; function getJavaTempDependencyDir() { @@ -87561,7 +93344,7 @@ function flushDiagnostics(config) { var fs12 = __toESM(require("fs")); var path13 = __toESM(require("path")); var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/codeql.ts var fs11 = __toESM(require("fs")); @@ -87821,7 +93604,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -87980,7 +93763,7 @@ var os3 = __toESM(require("os")); var path9 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index f674fcabe..c34522596 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os2 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs5 = __importStar4(require("fs")); - var os2 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs5 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve4({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path5 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path5 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path5.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs5 = __importStar4(require("fs")); - var path5 = __importStar4(require("path")); - _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs5 = __importStar2(require("fs")); + var path5 = __importStar2(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs5.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs5.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path5.dirname(filePath); const upperName = path5.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path5.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which5; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path5 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path5 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which5; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os2 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path5 = __importStar4(require("path")); - var io5 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path5 = __importStar2(require("path")); + var io5 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner5 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path5.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io5.which(this.toolPath, true); - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable5; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os2 = __importStar4(require("os")); - var path5 = __importStar4(require("path")); + var os2 = __importStar2(require("os")); + var path5 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable5(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable5; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path5.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput2; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os2.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs5 = __importStar4(require("fs")); - var path5 = __importStar4(require("path")); - _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs5.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs5.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path5.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path5.dirname(filePath); - const upperName = path5.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path5.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which5; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path5 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path5.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path5.join(dest, path5.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path5.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path5.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path5.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs5 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs5.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs5.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve4(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve4(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve4(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve4(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve4(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path5 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path5.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs5 = __importStar2(require("fs")); + var path5 = __importStar2(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs5.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path5.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path5.dirname(filePath); + const upperName = path5.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path5.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path5 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path5.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path5.join(dest, path5.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path5.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path5.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path5.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path5 = __importStar2(require("path")); + var io5 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path5.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io5.which(this.toolPath, true); + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve4(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os2 = __importStar2(require("os")); + var path5 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path5.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core13 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core13.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core13.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path5 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path5 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname2; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path5.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path5 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path5 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path5.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path5.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path5.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os2 = __importStar4(require("os")); - var path5 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os2 = __importStar2(require("os")); + var path5 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path5.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path5.sep}`)) { homedir = homedir || os2.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); - var fs5 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path5 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core13 = __importStar2(require_core2()); + var fs5 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path5 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core13.debug(`Search path '${searchPath}'`); try { - yield __await4(fs5.promises.lstat(searchPath)); + yield __await2(fs5.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path5.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path5.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path5.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve4, reject) { + v = o[n](v), settle(resolve4, reject, v.done, v.value); + }); + }; + } + function settle(resolve4, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve4({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core13 = __importStar2(require_core2()); + var fs5 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path5 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core13.info : core13.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path5.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs5.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs5.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs5 = __importStar4(require("fs")); - var path5 = __importStar4(require("path")); - _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs5.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path5.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path5.dirname(filePath); - const upperName = path5.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path5.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path5 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path5.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path5.join(dest, path5.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path5.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which5; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path5.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path5.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io5 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs5 = __importStar4(require("fs")); - var path5 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core13 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io5 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs5 = __importStar2(require("fs")); + var path5 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path5.join(baseLocation, "actions", "temp"); } - const dest = path5.join(tempDirectory, crypto.randomUUID()); + const dest = path5.join(tempDirectory, crypto2.randomUUID()); yield io5.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs5.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs5.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core13.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs5.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io5.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve4(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve4(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve4(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve4(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve4(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os2 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os2.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve4, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve4(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve4) => { - token = setTimeout(resolve4, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path5, preserveJsx) { + if (typeof path5 === "string" && /^\.\.?\//.test(path5)) { + return path5.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path5; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os2 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve4, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve4(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve4) => { + const handler = () => { + resolve4(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve4, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve4) : node_https_1.default.request(options, resolve4); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve4, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve4(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve4, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve4(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve4, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path5, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path5, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve4, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve4(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve4) => { + token = setTimeout(resolve4, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve4) => { - const handler = () => { - resolve4(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve4, reject) => { - const req = isInsecure ? http.request(options, resolve4) : https2.request(options, resolve4); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve4, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve4(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve4, reject) => { - this.resolve = resolve4; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve4) => setTimeout(() => resolve4(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs5 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs5); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path5 = urlParsed.pathname; path5 = path5 || "/"; path5 = escape(path5); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url, name) { + const urlParsed = new URL(url); let path5 = urlParsed.pathname; path5 = path5 ? path5.endsWith("/") ? `${path5}${name}` : `${path5}/${name}` : name; urlParsed.pathname = path5; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path5 = getURLPath(request.url) || "/"; + const path5 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path5}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve4, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve4).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve4(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path5 = urlParsed.pathname; + path5 = path5 || "/"; + path5 = escape(path5); + urlParsed.pathname = path5; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path5 = urlParsed.pathname; + path5 = path5 ? path5.endsWith("/") ? `${path5}${name}` : `${path5}/${name}` : name; + urlParsed.pathname = path5; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve4, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve4(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path5 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path5}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path5 = getURLPath(request.url) || "/"; + const path5 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path5}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path5 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path5}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve4, reject) => { + this.resolve = resolve4; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve4) => setTimeout(() => resolve4(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve4, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve4).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve4(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve4, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve4(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve4(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve4, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve4(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve4, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve4(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve4, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve4) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve4(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve4) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve4(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path5 = getURLPath(subRequest.url); + const path5 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path5 || path5 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path5 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path5 = (0, utils_common_js_1.getURLPath)(url); if (path5 && path5 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve4) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve4(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve4) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core13 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs5 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs5 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs5.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs5.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve4) => { timeoutHandle = setTimeout(() => resolve4("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core13 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core13.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs5 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs5 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs5.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core13.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io5 = __importStar4(require_io3()); + var io5 = __importStar2(require_io()); var fs_1 = require("fs"); - var path5 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path5 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io5.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path5.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); - var path5 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core13 = __importStar2(require_core()); + var path5 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core13.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs5 = __importStar4(require("fs")); - var path5 = __importStar4(require("path")); - _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs5.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path5.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path5.dirname(filePath); - const upperName = path5.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path5.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path5 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path5.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path5.join(dest, path5.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path5.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which5(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which5(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which5; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path5.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path5.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os2 = require("os"); - var cp = require("child_process"); - var fs5 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os2.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs5 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs5.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs5.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os2.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs5.existsSync(lsbReleaseFile)) { - contents = fs5.readFileSync(lsbReleaseFile).toString(); - } else if (fs5.existsSync(osReleaseFile)) { - contents = fs5.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path5 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path5.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs5 = __importStar2(require("fs")); + var path5 = __importStar2(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs5.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path5.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path5.dirname(filePath); + const upperName = path5.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path5.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path5 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path5.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path5.join(dest, path5.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path5.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path5.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path5.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path5 = __importStar2(require("path")); + var io5 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path5.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io5.which(this.toolPath, true); + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve4(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os2 = __importStar2(require("os")); + var path5 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path5.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os2 = require("os"); + var cp = require("child_process"); + var fs5 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os2.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os2.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs5.existsSync(lsbReleaseFile)) { + contents = fs5.readFileSync(lsbReleaseFile).toString(); + } else if (fs5.existsSync(osReleaseFile)) { + contents = fs5.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core13 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); - var io5 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs5 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os2 = __importStar4(require("os")); - var path5 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core13 = __importStar2(require_core3()); + var io5 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs5 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os2 = __importStar2(require("os")); + var path5 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path5.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path5.join(_getTempDirectory(), crypto2.randomUUID()); yield io5.mkdirP(path5.dirname(dest)); core13.debug(`Downloading ${url}`); core13.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs5.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io5.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io5.which("unzip", true); const args = [file]; if (!core13.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os2.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path5.join(_getTempDirectory(), crypto.randomUUID()); + dest = path5.join(_getTempDirectory(), crypto2.randomUUID()); } yield io5.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path5.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); core13.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve4(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve4(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve4(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve4(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve4(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80326,13 +87206,13 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -83700,12 +90580,12 @@ var semver4 = __toESM(require_semver2()); // src/overlay-database-utils.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -84147,7 +91027,7 @@ var featureConfig = { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -84233,13 +91113,13 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 3d7cb5668..a49121a47 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os3 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os3.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs9 = __importStar4(require("fs")); - var os3 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs9 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve4({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path8 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path8 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path8.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs9 = __importStar4(require("fs")); - var path8 = __importStar4(require("path")); - _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs9 = __importStar2(require("fs")); + var path8 = __importStar2(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs9.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs9.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path8.dirname(filePath); const upperName = path8.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path8.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path8 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path8 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os3 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path8 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path8 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable6; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os3 = __importStar4(require("os")); - var path8 = __importStar4(require("path")); + var os3 = __importStar2(require("os")); + var path8 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable6(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable6; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path8.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os3.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput2; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug5(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug5; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os3.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs9 = __importStar4(require("fs")); - var path8 = __importStar4(require("path")); - _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs9.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs9.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path8.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path8.dirname(filePath); - const upperName = path8.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path8.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path8 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path8.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path8.join(dest, path8.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path8.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path8.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path8.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29251,11 +28965,1440 @@ var require_dist_node15 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs9 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs9.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs9.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve4(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve4(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve4(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve4(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve4(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib3(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path8 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path8.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -29264,28 +30407,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs9 = __importStar2(require("fs")); + var path8 = __importStar2(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path8.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path8.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path8 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path8.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path8.join(dest, path8.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path8.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path8.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path8.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path8 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve4(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os3 = __importStar2(require("os")); + var path8 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path8.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core13 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -29296,10 +31805,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core13.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core13.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -29307,40 +31824,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path8 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path8 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { p = safeTrimTrailingSeparator(p); @@ -29355,15 +31876,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname2; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -29378,11 +31899,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path8.sep; @@ -29391,7 +31912,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -29400,7 +31921,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -29438,9 +31959,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -29450,40 +31971,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -30327,41 +32852,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path8 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path8 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -30371,7 +32900,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path8.sep); @@ -30387,17 +32916,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -30424,42 +32953,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os3 = __importStar4(require("os")); - var path8 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os3 = __importStar2(require("os")); + var path8 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -30472,9 +33005,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -30541,17 +33074,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path8.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path8.sep}`)) { homedir = homedir || os3.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -30625,9 +33158,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -30641,34 +33174,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -30695,7 +33232,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -30714,10 +33251,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -30738,7 +33275,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -30752,11 +33289,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); - var fs9 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path8 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core13 = __importStar2(require_core2()); + var fs9 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path8 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -30771,19 +33308,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -30792,7 +33331,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -30805,7 +33344,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core13.debug(`Search path '${searchPath}'`); try { - yield __await4(fs9.promises.lstat(searchPath)); + yield __await2(fs9.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -30822,24 +33361,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path8.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -30848,7 +33390,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -30867,7 +33409,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -30904,11 +33446,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve4, reject) { + v = o[n](v), settle(resolve4, reject, v.done, v.value); + }); + }; + } + function settle(resolve4, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve4({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core13 = __importStar2(require_core2()); + var fs9 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path8 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core13.info : core13.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path8.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs9.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs9.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -30936,435 +33618,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs9 = __importStar4(require("fs")); - var path8 = __importStar4(require("path")); - _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs9.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path8.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path8.dirname(filePath); - const upperName = path8.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path8.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path8 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path8.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path8.join(dest, path8.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path8.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path8.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path8.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -32561,7 +34834,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32574,21 +34847,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -32615,7 +34898,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32635,20 +34918,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs9 = __importStar4(require("fs")); - var path8 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core13 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs9 = __importStar2(require("fs")); + var path8 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -32664,27 +34956,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path8.join(baseLocation, "actions", "temp"); } - const dest = path8.join(tempDirectory, crypto.randomUUID()); + const dest = path8.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs9.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -32708,15 +34998,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs9.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -32738,7 +35026,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core13.debug(`zstd version: ${version}`); @@ -32749,13 +35037,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs9.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -32763,14 +35049,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -32780,9 +35064,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -32790,1772 +35073,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve4(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve4(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve4(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve4(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve4(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os3 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os3.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve4, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve4(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve4) => { - token = setTimeout(resolve4, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -34583,6 +35104,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -34907,7 +35429,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -34983,9 +35505,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path8, preserveJsx) { + if (typeof path8 === "string" && /^\.\.?\//.test(path8)) { + return path8.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path8; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -34995,7 +35525,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -35022,6 +35552,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -35032,6 +35570,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -35053,400 +35595,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os3 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os3.arch()}-${os3.type()}-${os3.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -35460,295 +35617,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve4, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve4(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -35761,6 +35920,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -35784,8 +35944,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -35836,21 +35995,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve4) => { + const handler = () => { + resolve4(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve4, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve4) : node_https_1.default.request(options, resolve4); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve4, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve4(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve4, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve4(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -35859,7 +37413,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -35894,7 +37448,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -35903,7 +37457,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -35933,16 +37487,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -36095,8 +37649,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -36201,11 +37755,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -36609,17 +38163,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -36691,7 +38245,7 @@ var require_src = __commonJS({ var require_helpers2 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -36704,24 +38258,24 @@ var require_helpers2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -36758,10 +38312,10 @@ var require_helpers2 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -36774,29 +38328,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers2(), exports2); + __exportStar2(require_helpers2(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -36917,12 +38471,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve4, reject) => { @@ -37010,10 +38564,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -37026,30 +38580,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -37160,10 +38714,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -37176,30 +38730,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -37289,18 +38843,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -37331,7 +38885,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -37350,7 +38904,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -37385,7 +38939,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -37428,8 +38982,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -37441,6 +38994,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path8, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path8, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve4, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve4(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve4) => { + token = setTimeout(resolve4, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -37463,24 +41026,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -37490,7 +41061,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -37505,8 +41077,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -37545,7 +41117,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -37558,10 +41133,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -37581,18 +41157,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -37601,14 +41174,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -37616,7 +41193,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -37653,12 +41230,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -37674,54 +41250,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -37733,24 +41272,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -37764,7 +41302,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -37832,9 +41370,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -37843,41 +41383,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -37889,425 +41494,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve4) => { - const handler = () => { - resolve4(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve4, reject) => { - const req = isInsecure ? http.request(options, resolve4) : https2.request(options, resolve4); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve4, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve4(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -38319,7 +41616,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -38333,7 +41630,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -38346,7 +41643,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -38355,7 +41652,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -38368,14 +41668,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -38386,14 +41685,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -38434,32 +41732,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -38491,22 +41813,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -38517,6 +41878,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -38553,17 +41938,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -38607,46 +41991,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -38660,21 +42044,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -38684,28 +42068,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -38716,25 +42100,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -38762,6 +42146,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -38772,509 +42163,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -39282,6 +42170,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -39322,7 +42211,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -39336,8 +42225,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -39395,8 +42286,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -39442,7 +42334,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -39451,7 +42351,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -39490,7 +42390,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -39501,514 +42403,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -40017,24 +42414,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -40050,52 +42446,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -40112,7 +42520,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -40121,12 +42528,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -40192,12 +42602,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -40261,14 +42670,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -40331,7 +42739,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -40485,7 +42892,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -40494,7 +42900,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -40502,7 +42908,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -40540,7 +42946,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -40558,7 +42964,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -40599,7 +43005,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -40645,7 +43054,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -40659,8 +43068,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -40699,7 +43107,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -40782,7 +43190,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -40792,7 +43199,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -40820,7 +43227,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -40829,7 +43235,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -40884,7 +43290,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -40930,7 +43337,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -40963,7 +43369,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -40972,25 +43377,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -41001,17 +43406,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -41019,7 +43423,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -41036,7 +43440,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -41077,7 +43481,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -41089,18 +43492,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -41134,8 +43537,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -41173,7 +43575,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -41185,7 +43588,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -41198,7 +43600,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -41207,7 +43608,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -41219,8 +43623,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -41229,9 +43633,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -41248,24 +43650,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -41290,7 +43690,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -41310,7 +43710,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -41335,16 +43734,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -41357,7 +43756,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -41366,8 +43764,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -41375,16 +43773,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -41414,7 +43812,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -41423,9 +43820,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -41468,10 +43864,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -41580,17 +43975,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -41601,31 +43995,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -41699,16 +44113,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -41720,7 +44134,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -41745,18 +44162,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -41777,10 +44194,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -41815,11 +44231,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -41857,7 +44276,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -41872,7 +44291,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41888,7 +44307,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -41929,8 +44348,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -41955,7 +44377,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -41963,10 +44387,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -41982,6 +44404,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -41991,7 +44415,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -42022,7 +44446,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -42034,15 +44460,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -42171,14 +44596,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -42200,13 +44626,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -42215,10 +44641,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -42229,17 +44658,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -42253,8 +44681,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -42262,7 +44689,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -42281,7 +44711,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -42319,7 +44750,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -42328,7 +44758,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -42339,12 +44769,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -42378,1680 +44807,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -44089,7 +45675,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -44123,7 +45709,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -44145,6 +45731,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -44162,7 +45759,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -44174,1193 +45771,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve4, reject) => { - this.resolve = resolve4; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve4) => setTimeout(() => resolve4(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs9 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs9); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -45386,17 +45805,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -45405,14 +45834,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -45438,16 +45867,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -45545,7 +45974,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -45580,9 +46009,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -45604,8 +46033,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path8 = urlParsed.pathname; path8 = path8 || "/"; path8 = escape(path8); @@ -45637,7 +46113,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -45692,15 +46168,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(url, name) { + const urlParsed = new URL(url); let path8 = urlParsed.pathname; path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; urlParsed.pathname = path8; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -45719,34 +46195,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -45758,8 +46233,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -45780,8 +46255,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -45796,7 +46271,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -45844,11 +46322,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -45865,31 +46363,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -45898,12 +46396,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -45984,6 +46482,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -45995,25 +46497,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -46069,22 +46585,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -46092,15 +46644,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -46125,21 +46677,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -46157,10 +46709,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -46173,9 +46725,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -46183,16 +46735,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -46208,21 +46773,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -46237,10 +46821,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -46259,6 +46854,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -46682,7 +47287,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -46699,31 +47321,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -46733,7 +47355,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -46753,10 +47375,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -46777,10 +47399,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path8 = getURLPath(request.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path8}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -46800,6 +47422,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -46811,7 +47443,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -46829,7 +47482,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -46837,10 +47490,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -46852,7 +47516,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -46860,44 +47536,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve4, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve4).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve4(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve4, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve4(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path8 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -46913,71 +49599,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -46989,61 +49686,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -47051,12 +49762,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -47072,10 +49783,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path8 = getURLPath(request.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path8}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -47095,14 +49806,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path8 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path8}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -47119,17 +50190,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -47138,24 +50223,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -47164,6 +50293,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -47187,9 +50324,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -47212,7 +50350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -47220,75 +50358,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -47297,28 +50446,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -47361,7 +50510,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -47433,7 +50735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -47482,7 +50784,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -47509,7 +50811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -47548,7 +50850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -47600,7 +50902,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -47638,7 +50940,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -47651,6 +50953,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -47668,7 +50991,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -47686,7 +51009,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -47712,7 +51035,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -47775,7 +51098,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -47823,7 +51146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -47935,7 +51258,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -47960,7 +51283,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -48025,7 +51348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -48075,7 +51398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -48109,7 +51432,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -48135,7 +51458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -48161,7 +51484,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -48187,7 +51510,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -48217,7 +51540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -48281,7 +51604,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -48306,7 +51629,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -48393,7 +51716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -48418,7 +51741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -48745,7 +52068,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -48816,7 +52139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -48855,7 +52178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -48872,7 +52195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -48921,7 +52244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -48960,7 +52283,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -48985,7 +52308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -49029,7 +52352,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -49055,7 +52378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -49081,7 +52404,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -49123,7 +52446,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -49140,7 +52463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -49190,7 +52513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -49235,7 +52558,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -49252,7 +52575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -49278,7 +52601,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -49317,7 +52640,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -49354,7 +52677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -49370,7 +52693,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -49407,7 +52730,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -49423,7 +52746,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -49467,7 +52790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -49483,7 +52806,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -49520,7 +52843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -49536,7 +52859,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -49580,7 +52903,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -49596,7 +52919,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -49675,7 +52998,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -49691,7 +53014,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -49735,7 +53058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -49751,7 +53074,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -49795,7 +53118,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -49811,7 +53134,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -49869,7 +53192,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -49885,7 +53208,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -50025,7 +53348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50041,7 +53364,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -50085,7 +53408,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -50101,7 +53424,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -50159,7 +53482,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -50175,7 +53498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -50241,7 +53564,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -50315,7 +53638,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -50331,7 +53654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -50375,7 +53698,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -50391,7 +53714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -50435,7 +53758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -50451,7 +53774,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -50481,7 +53804,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -50497,7 +53820,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -50534,7 +53857,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -50550,7 +53873,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -50608,7 +53931,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -50624,7 +53947,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -50675,7 +53998,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -50691,7 +54014,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -50749,7 +54072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -50765,7 +54088,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -50823,7 +54146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -50839,7 +54162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -50897,7 +54220,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -50913,7 +54236,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -50964,7 +54287,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -50980,7 +54303,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -51031,7 +54354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -51047,7 +54370,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -51119,7 +54442,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -51135,7 +54458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -51475,7 +54798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -51491,7 +54814,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -51867,7 +55190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51883,7 +55206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -51927,7 +55250,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -51943,7 +55266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -51987,7 +55310,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -52003,7 +55326,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -52054,7 +55377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -52070,7 +55393,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -52135,7 +55458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -52151,7 +55474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -52203,7 +55526,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -52219,7 +55542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -52256,7 +55579,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -52272,7 +55595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -52316,7 +55639,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -52332,7 +55655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -52418,7 +55741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -52434,7 +55757,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -52492,7 +55815,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -52508,7 +55831,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -52559,7 +55882,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -52575,7 +55898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -52633,7 +55956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52649,7 +55972,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -52707,7 +56030,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52723,7 +56046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -52781,7 +56104,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52797,7 +56120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -52876,7 +56199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -52892,7 +56215,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -52972,7 +56295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -52984,11 +56307,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -53089,7 +56426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -53101,11 +56438,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -53149,7 +56500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -53165,7 +56516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -53202,7 +56553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -53218,7 +56569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -53290,7 +56641,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -53306,7 +56657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -53566,7 +56917,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -53582,7 +56933,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -53626,7 +56977,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -53642,7 +56993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -53686,7 +57037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -53702,7 +57053,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -53795,7 +57146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -53811,7 +57162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -53911,7 +57262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -53927,7 +57278,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -54006,7 +57357,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -54022,7 +57373,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -54115,7 +57466,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -54127,11 +57478,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -54196,7 +57561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -54212,7 +57577,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -54277,7 +57642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -54293,7 +57658,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -54358,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -54374,7 +57739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -54439,7 +57804,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -54455,7 +57820,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -54528,7 +57893,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -54544,7 +57909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -54637,7 +58002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -54653,7 +58018,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -54760,7 +58125,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -54776,7 +58141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -54876,7 +58241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -54888,11 +58253,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -54950,7 +58329,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -54966,7 +58345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -55059,7 +58438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -55075,7 +58454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -55168,7 +58547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -55180,11 +58559,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -55263,7 +58656,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -55279,7 +58672,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -55358,7 +58751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -55370,11 +58763,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -55474,7 +58881,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -55490,7 +58897,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -55562,7 +58969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -55578,189 +58985,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -55771,11 +59008,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -55786,7 +59023,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -55798,7 +59035,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -55809,7 +59046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -55820,7 +59057,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -55833,10 +59070,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -55844,7 +59081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -55854,7 +59091,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -55865,7 +59102,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -55876,7 +59113,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -55887,7 +59124,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -55897,7 +59134,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -55907,7 +59144,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -55920,7 +59157,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -55938,11 +59175,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -55953,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -55964,7 +59201,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -55975,7 +59212,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -55986,7 +59223,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -55997,7 +59234,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -56008,7 +59245,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -56019,7 +59256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -56029,7 +59266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -56040,7 +59277,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -56052,7 +59289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -56063,7 +59300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -56077,7 +59314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -56091,7 +59328,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -56101,7 +59338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -56111,7 +59348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -56121,7 +59358,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -56132,7 +59369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -56143,7 +59380,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -56161,7 +59398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -56172,7 +59409,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -56182,7 +59419,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -56192,7 +59429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -56203,7 +59440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -56214,7 +59451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -56224,7 +59461,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -56235,7 +59472,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -56246,7 +59483,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -56256,7 +59493,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -56266,7 +59503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -56277,7 +59514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -56288,7 +59525,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -56299,7 +59536,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -56310,7 +59547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -56320,7 +59557,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -56331,7 +59568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -56342,7 +59579,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -56371,7 +59608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -56382,7 +59619,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -56392,7 +59629,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -56402,7 +59639,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -56412,7 +59649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -56422,7 +59659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -56432,7 +59669,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -56442,7 +59679,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -56452,7 +59689,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -56462,7 +59699,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -56472,7 +59709,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -56482,7 +59719,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -56492,7 +59729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -56503,7 +59740,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -56513,7 +59750,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -56524,7 +59761,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -56535,7 +59772,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -56545,7 +59782,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -56555,7 +59792,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -56565,7 +59802,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -56575,7 +59812,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -56585,7 +59822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -56595,7 +59832,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -56605,7 +59842,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -56616,7 +59853,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -56626,7 +59863,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -56637,7 +59874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -56648,7 +59885,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -56659,7 +59896,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -56669,7 +59906,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -56680,7 +59917,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -56707,7 +59944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -56718,7 +59955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56732,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56746,7 +59983,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -56756,7 +59993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56770,7 +60007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -56780,7 +60017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -56791,7 +60028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -56801,7 +60038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -56811,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -56821,7 +60058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -56832,7 +60069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -56842,7 +60079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -56852,7 +60089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -56863,7 +60100,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -56874,7 +60121,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -56885,7 +60132,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -56896,7 +60143,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -56907,7 +60154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -56935,11 +60182,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -56950,7 +60197,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -56961,11 +60208,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -56975,7 +60222,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -56985,7 +60232,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -56996,7 +60243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -57007,7 +60254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -57018,7 +60265,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -57029,7 +60276,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -57040,7 +60287,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57051,7 +60298,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -57062,7 +60309,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -57073,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57087,7 +60334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57101,7 +60348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57115,7 +60362,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -57126,7 +60373,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -57137,7 +60384,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -57148,7 +60395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -57158,7 +60405,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -57169,7 +60416,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -57180,7 +60427,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -57190,7 +60437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -57200,7 +60447,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -57212,7 +60459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -57223,7 +60470,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -57234,7 +60481,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -57245,7 +60492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -57255,7 +60502,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -57269,7 +60516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -57279,7 +60526,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -57290,7 +60537,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -57301,7 +60548,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -57311,7 +60558,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -57322,7 +60569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -57333,11 +60580,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -57348,7 +60595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -57361,7 +60608,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -57375,8 +60636,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -57384,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -57408,15 +60669,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -57426,8 +60687,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -57436,10 +60697,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -57449,173 +60711,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -57624,58 +60886,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -57689,7 +60965,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -57697,7 +60973,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -57705,14 +60981,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -57742,8 +61018,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -57753,8 +61029,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -57770,7 +61046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57778,8 +61054,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57787,8 +61063,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57796,7 +61072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57807,8 +61083,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -57825,124 +61101,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -57961,117 +61238,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -58082,304 +61359,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -58433,8 +61724,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -58462,8 +61753,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -58487,8 +61778,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58496,8 +61787,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58508,8 +61799,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58534,8 +61825,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -58546,8 +61837,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -58556,8 +61847,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -58568,8 +61859,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -58601,7 +61892,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58615,651 +61907,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -59270,112 +62578,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -59390,8 +62712,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -59399,16 +62721,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -59421,8 +62743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -59446,8 +62768,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -59456,8 +62778,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -59471,358 +62793,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -59835,8 +63173,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -59846,8 +63184,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -59858,8 +63196,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -59870,7 +63208,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59880,161 +63219,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -60051,8 +63405,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -60067,8 +63421,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -60079,8 +63433,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -60092,8 +63446,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -60106,8 +63460,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -60116,11 +63470,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -60130,47 +63485,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60182,51 +63537,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -60236,33 +63592,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60274,38 +63630,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -60315,45 +63672,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60365,41 +63722,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -60408,67 +63793,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -60561,6 +64091,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -60605,22 +64179,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -60725,12 +64294,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -60777,7 +64398,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -60794,18 +64438,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -60820,8 +64602,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -60852,19 +64634,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -60931,13 +64713,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -60952,10 +64734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -61015,38 +64797,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -61067,18 +64872,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -61089,7 +64894,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -61112,18 +64917,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61136,7 +64941,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -61159,18 +64964,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61184,7 +64989,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -61207,23 +65012,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61236,7 +65041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -61259,27 +65064,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61292,7 +65097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -61315,27 +65120,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61349,7 +65154,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -61361,47 +65227,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -61423,7 +65306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -61433,34 +65316,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -61468,73 +65352,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -61542,32 +65429,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -61580,52 +65489,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -61651,12 +65514,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -62083,7 +66003,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -62091,6 +66011,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -62102,13 +66024,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -62117,8 +66058,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -62130,19 +66071,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -62151,7 +66092,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -62163,17 +66104,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -62182,59 +66123,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -62291,7 +66233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -62331,87 +66273,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -62425,13 +66383,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -62441,31 +66424,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -62477,49 +66460,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -62532,8 +66538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -62587,7 +66592,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -62596,11 +66640,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -62688,6 +66731,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -63025,7 +67080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63033,6 +67088,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -63041,52 +67098,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -63096,27 +67176,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve4, reject) => { + this.resolve = resolve4; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve4) => setTimeout(() => resolve4(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -63124,20 +68378,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -63145,10 +68400,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -63188,12 +68443,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -63203,27 +68467,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -63293,333 +68591,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve4, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve4).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve4(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve4, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve4(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -63627,28 +68628,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve4(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve4, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -63659,18 +68660,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve4(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve4, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve4(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve4, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -63681,9 +68694,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -63699,49 +68751,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -63750,8 +68802,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -63760,8 +68812,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -63791,7 +68843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -63800,76 +68852,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -63877,8 +68959,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -63886,9 +68967,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -63897,7 +68978,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -63914,9 +68998,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -63927,7 +69011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -63937,7 +69021,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -63948,17 +69032,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -63966,19 +69058,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -63988,19 +69082,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -64010,13 +69112,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -64027,7 +69129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -64039,14 +69141,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -64057,22 +69161,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -64088,15 +69194,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -64106,15 +69214,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -64125,24 +69240,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -64163,57 +69280,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -64221,15 +69339,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -64241,14 +69359,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -64258,36 +69376,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -64298,31 +69419,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -64330,12 +69452,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -64346,26 +69468,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -64379,8 +69504,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -64388,7 +69513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -64408,10 +69533,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -64426,7 +69554,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -64454,21 +69582,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -64476,12 +69606,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -64493,18 +69623,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve4) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve4(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -64513,17 +69649,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve4) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -64531,8 +69717,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -64543,8 +69729,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -64557,8 +69743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -64568,60 +69754,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -64632,40 +69823,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -64673,20 +69879,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -64699,20 +69916,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -64721,29 +69940,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -64758,7 +69992,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -64772,74 +70006,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -64851,8 +70100,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -64861,15 +70110,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -64885,26 +70151,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -64922,7 +70190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -64933,32 +70201,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -64983,22 +70267,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -65006,10 +70305,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -65027,7 +70326,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -65044,18 +70343,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65066,30 +70366,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65097,20 +70399,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -65139,18 +70443,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -65177,7 +70481,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -65198,23 +70502,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -65224,32 +70527,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -65275,15 +70578,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -65302,27 +70608,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -65340,50 +70646,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -65394,13 +70708,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -65408,23 +70722,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65433,21 +70749,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65455,7 +70783,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -65463,19 +70791,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -65488,7 +70818,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -65499,32 +70829,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -65533,13 +70866,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -65549,7 +70884,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -65558,16 +70893,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -65575,22 +70912,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -65610,17 +70949,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -65629,94 +70966,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -65742,13 +71064,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -65758,17 +71083,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -65777,7 +71104,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -65785,20 +71112,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65819,17 +71148,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -65839,94 +71166,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -65935,7 +71256,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -65953,13 +71276,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -65967,24 +71293,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -65992,12 +71320,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -66005,22 +71335,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66030,38 +71362,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -66072,15 +71438,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -66092,18 +71458,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -66123,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -66138,7 +71504,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -66153,6 +71519,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -66192,6 +71568,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve4(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -66208,11 +71586,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -66236,13 +71639,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -66254,13 +71657,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -66269,28 +71672,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -66298,24 +71701,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -66328,9 +71739,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -66339,19 +71750,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -66360,23 +71771,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path8 = getURLPath(subRequest.url); + const path8 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path8 || path8 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -66387,7 +71798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -66404,7 +71815,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -66415,7 +71826,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -66426,18 +71837,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path8 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path8 = (0, utils_common_js_1.getURLPath)(url); if (path8 && path8 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -66449,10 +71878,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -66463,7 +71892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -66481,11 +71910,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -66493,17 +71936,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -66512,10 +71970,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -66532,7 +71992,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -66541,48 +72029,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -66590,34 +72078,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -66634,7 +72140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -66656,7 +72162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -66664,7 +72170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -66674,15 +72180,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -66690,12 +72208,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -66708,14 +72226,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -66723,8 +72245,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -66735,19 +72257,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66759,24 +72288,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -66789,7 +72318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -66797,8 +72326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -66847,29 +72376,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -66884,7 +72413,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -66898,7 +72427,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -66908,10 +72437,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -66923,14 +72452,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -66943,18 +72472,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -66963,23 +72512,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -66995,44 +72567,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -67040,64 +72594,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -67105,41 +72658,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -67158,7 +72714,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -67175,17 +72734,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -67193,35 +72750,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -67229,118 +72773,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -67358,7 +72922,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -67379,23 +72946,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -67415,18 +72986,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -67437,27 +73006,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -67467,53 +73020,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -67521,11 +73075,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -67537,7 +73090,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -67556,7 +73111,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -67565,14 +73123,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -67584,7 +73142,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -67604,18 +73162,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve4) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve4(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -67624,45 +73185,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve4) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -67766,6 +73360,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -67773,7 +73419,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -67820,12 +73466,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -67851,10 +73502,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -67871,13 +73534,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -67906,6 +73573,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -67927,44 +73610,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -67975,22 +73676,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -68005,35 +73734,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -68044,22 +73773,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -68076,7 +73814,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -68090,47 +73828,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68139,15 +73859,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68157,14 +73877,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68175,14 +73895,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68190,7 +73910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -68202,9 +73922,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -68225,23 +73951,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68261,18 +73991,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68283,27 +74011,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68311,57 +74023,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68373,7 +74081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68385,7 +74093,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68404,7 +74114,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68420,45 +74133,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -68466,45 +74161,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -68526,7 +74217,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -68538,17 +74229,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -68567,7 +74261,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68577,16 +74274,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -68600,19 +74297,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -68620,7 +74325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -68628,21 +74333,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -68650,7 +74356,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -68658,66 +74364,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -68802,7 +74566,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -68815,21 +74579,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -68857,9 +74631,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core13 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -68942,15 +74717,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -68969,7 +74746,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -68977,7 +74753,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -68990,21 +74766,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -69032,9 +74818,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib3(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -69042,14 +74833,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -69061,14 +74850,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -69105,9 +74893,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -69131,13 +74918,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -69145,7 +75074,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69158,21 +75087,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -69200,20 +75139,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib3(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs9 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs9 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -69315,10 +75257,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs9.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -69338,17 +75280,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs9.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -69365,7 +75306,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -69378,7 +75319,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -69402,9 +75343,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -69425,8 +75365,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -69442,8 +75382,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -69487,8 +75427,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve4) => { timeoutHandle = setTimeout(() => resolve4("timeout"), timeoutMs); @@ -69505,7 +75444,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69518,23 +75457,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core13 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -69559,7 +75509,6 @@ var require_options = __commonJS({ core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -69601,7 +75550,6 @@ var require_options = __commonJS({ core13.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -69610,7 +75558,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -69619,13 +75569,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -69637,7 +75585,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -69646,7 +75593,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -69683,22 +75630,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -69709,12 +75660,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -69722,7 +75672,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69735,21 +75685,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -69777,13 +75737,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); - var http_client_1 = require_lib3(); - var auth_1 = require_auth2(); - var fs9 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core13 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs9 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -69816,11 +75779,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -69843,11 +75806,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -69864,7 +75826,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -69880,9 +75842,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -69890,24 +75851,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -69916,7 +75876,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs9.openSync(archivePath, "r"); @@ -69927,7 +75887,7 @@ Other caches with similar key:`); core13.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -69950,15 +75910,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -69980,7 +75940,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -71575,26 +77534,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -71603,22 +77562,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -71632,10 +77591,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -71840,26 +77799,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -71871,26 +77830,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -72140,7 +78099,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -72153,13 +78112,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -72171,19 +78130,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -72288,8 +78247,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -72859,18 +78818,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -73061,7 +79020,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -73170,7 +79129,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -73178,7 +79137,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -73192,7 +79151,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -73284,9 +79243,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -73307,7 +79266,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -73456,7 +79415,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -73503,7 +79462,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -73525,7 +79484,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -73574,7 +79533,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -73595,7 +79554,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -73643,7 +79602,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -73664,7 +79623,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -73712,7 +79671,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -73732,7 +79691,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -73762,7 +79721,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -73836,7 +79795,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -74006,7 +79965,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -74130,7 +80089,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74216,11 +80175,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -74292,11 +80251,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -74358,17 +80317,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -74843,7 +80802,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -74911,11 +80870,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -74931,7 +80891,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -74944,7 +80903,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -74952,7 +80910,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -74980,16 +80938,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib3(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -75013,14 +80971,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -75030,7 +80988,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -75101,7 +81059,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); }); } @@ -75121,7 +81079,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -75129,7 +81086,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -75142,21 +81099,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -75184,16 +81151,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path8 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path8 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -75225,8 +81194,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -75256,8 +81225,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -75279,7 +81248,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -75303,7 +81272,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -75328,7 +81297,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -75342,37 +81311,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path8.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -75385,21 +81351,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -75427,15 +81403,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); - var path8 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core13 = __importStar2(require_core()); + var path8 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib3(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -75484,9 +81463,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -75499,9 +81477,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core13.debug("Resolved Keys:"); @@ -75558,8 +81535,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -75630,8 +81607,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -75645,10 +81622,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -75709,8 +81685,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -76110,8 +82086,8 @@ var require_helpers3 = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -76853,7 +82829,7 @@ var require_scan = __commonJS({ }); // node_modules/jsonschema/lib/validator.js -var require_validator2 = __commonJS({ +var require_validator = __commonJS({ "node_modules/jsonschema/lib/validator.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -77079,7 +83055,7 @@ var require_validator2 = __commonJS({ var require_lib4 = __commonJS({ "node_modules/jsonschema/lib/index.js"(exports2, module2) { "use strict"; - var Validator2 = module2.exports.Validator = require_validator2(); + var Validator2 = module2.exports.Validator = require_validator(); module2.exports.ValidatorResult = require_helpers3().ValidatorResult; module2.exports.ValidatorResultError = require_helpers3().ValidatorResultError; module2.exports.ValidationError = require_helpers3().ValidationError; @@ -77093,432 +83069,43 @@ var require_lib4 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs9 = __importStar4(require("fs")); - var path8 = __importStar4(require("path")); - _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs9.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path8.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path8.dirname(filePath); - const upperName = path8.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path8.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path8 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path8.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path8.join(dest, path8.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path8.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path8.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path8.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os3 = require("os"); - var cp = require("child_process"); - var fs9 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os3.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs9 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs9.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs9.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os3.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs9.existsSync(lsbReleaseFile)) { - contents = fs9.readFileSync(lsbReleaseFile).toString(); - } else if (fs9.existsSync(osReleaseFile)) { - contents = fs9.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path8 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path8.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs9 = __importStar2(require("fs")); + var path8 = __importStar2(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path8.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path8.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path8 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path8.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path8.join(dest, path8.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path8.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path8.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path8.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path8 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve4(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os3 = __importStar2(require("os")); + var path8 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path8.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os3 = require("os"); + var cp = require("child_process"); + var fs9 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os3.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os3.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs9.existsSync(lsbReleaseFile)) { + contents = fs9.readFileSync(lsbReleaseFile).toString(); + } else if (fs9.existsSync(osReleaseFile)) { + contents = fs9.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core13 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve4) => setTimeout(resolve4, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve4) { resolve4(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs9 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os3 = __importStar4(require("os")); - var path8 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core13 = __importStar2(require_core3()); + var io6 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs9 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os3 = __importStar2(require("os")); + var path8 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path8.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path8.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path8.dirname(dest)); core13.debug(`Downloading ${url}`); core13.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs9.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core13.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os3.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path8.join(_getTempDirectory(), crypto.randomUUID()); + dest = path8.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path8.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core13.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve4(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve4(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve4(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve4(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve4(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug5; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug5 = require_debug2(); + var debug5 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -80381,14 +87261,14 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -83595,7 +90475,7 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/caching-utils.ts var core6 = __toESM(require_core()); @@ -83603,7 +90483,7 @@ var core6 = __toESM(require_core()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -84325,7 +91205,7 @@ var GitHubFeatureFlags = class { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/codeql.ts var fs8 = __toESM(require("fs")); @@ -84592,7 +91472,7 @@ var PACK_IDENTIFIER_PATTERN = (function() { })(); // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -84653,7 +91533,7 @@ var import_child_process = require("child_process"); var fs5 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -84812,7 +91692,7 @@ var os = __toESM(require("os")); var path5 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index a880762bb..da7b20d8d 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var os = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve2({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs2.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs2.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path2.dirname(filePath); const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path2.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path2 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner5 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable5; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed; + exports2.isDebug = isDebug3; + exports2.debug = debug4; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info7; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState3; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable5(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable5; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed; function isDebug3() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug3; function debug4(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug4; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info7(message) { process.stdout.write(message + os.EOL); } - exports2.info = info7; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState3(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState3; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs2.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29565,8 +29279,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -30548,11 +30262,1440 @@ var require_lib3 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed; + function isDebug3() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug3; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState3(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState3; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname2; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path2.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path2.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { homedir = homedir || os.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core2()); + var fs2 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path2 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs2.promises.lstat(searchPath)); + yield __await2(fs2.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core2()); + var fs2 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path2 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs2.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs2.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create3; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create3(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path2.join(baseLocation, "actions", "temp"); } - const dest = path2.join(tempDirectory, crypto.randomUUID()); + const dest = path2.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs2.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs2.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs2.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug5, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug5(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug4 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug4("azure"); - AzureLogger.log = (...args) => { - debug4.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug4.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug4.disable(); - debug4.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve2, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve2(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { - token = setTimeout(resolve2, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path2, preserveJsx) { + if (typeof path2 === "string" && /^\.\.?\//.test(path2)) { + return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path2; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay(delayInMs, value, options) { - return new Promise((resolve2, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve2(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug4, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug4(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve2) => { + const handler = () => { + resolve2(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve2, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve2) : node_https_1.default.request(options, resolve2); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve2, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve2(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay(delayInMs, value, options) { + return new Promise((resolve2, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve2(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve2, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug4 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug4 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path2, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path2, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve2, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve2(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { + token = setTimeout(resolve2, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve2) => { - const handler = () => { - resolve2(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve2, reject) => { - const req = isInsecure ? http.request(options, resolve2) : https2.request(options, resolve2); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve2, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve2(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info7; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _2 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _2), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve2, reject) => { - this.resolve = resolve2; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs2 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs2); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 || "/"; path2 = escape(path2); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url, name) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; urlParsed.pathname = path2; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve2, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve2).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve2(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 || "/"; + path2 = escape(path2); + urlParsed.pathname = path2; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; + urlParsed.pathname = path2; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve2, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve2(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve2, reject) => { + this.resolve = resolve2; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve2, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve2).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve2(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve2, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve2(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve2(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve2, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve2(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve2, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve2, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve2(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path2 = getURLPath(subRequest.url); + const path2 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path2 || path2 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path2 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path2 = (0, utils_common_js_1.getURLPath)(url); if (path2 && path2 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs2 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs2 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs2.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs2.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve2) => { timeoutHandle = setTimeout(() => resolve2("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs2 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs2 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs2.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77097,7 +83073,7 @@ var require_cache3 = __commonJS({ var require_config2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -77109,7 +83085,7 @@ var require_config2 = __commonJS({ exports2.getConcurrency = getConcurrency; exports2.getUploadChunkTimeout = getUploadChunkTimeout; exports2.getMaxArtifactListCount = getMaxArtifactListCount; - var os_1 = __importDefault4(require("os")); + var os_1 = __importDefault2(require("os")); var core_1 = require_core(); function getUploadChunkSize() { return 8 * 1024 * 1024; @@ -77193,13 +83169,13 @@ var require_timestamp = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Timestamp = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var Timestamp$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.Timestamp", [ @@ -77342,13 +83318,13 @@ var require_wrappers = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BytesValue = exports2.StringValue = exports2.BoolValue = exports2.UInt32Value = exports2.Int32Value = exports2.UInt64Value = exports2.Int64Value = exports2.FloatValue = exports2.DoubleValue = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); - var runtime_6 = require_commonjs11(); - var runtime_7 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); + var runtime_6 = require_commonjs16(); + var runtime_7 = require_commonjs16(); var DoubleValue$Type = class extends runtime_7.MessageType { constructor() { super("google.protobuf.DoubleValue", [ @@ -77934,12 +83910,12 @@ var require_artifact = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ArtifactService = exports2.DeleteArtifactResponse = exports2.DeleteArtifactRequest = exports2.GetSignedArtifactURLResponse = exports2.GetSignedArtifactURLRequest = exports2.ListArtifactsResponse_MonolithArtifact = exports2.ListArtifactsResponse = exports2.ListArtifactsRequest = exports2.FinalizeArtifactResponse = exports2.FinalizeArtifactRequest = exports2.CreateArtifactResponse = exports2.CreateArtifactRequest = exports2.FinalizeMigratedArtifactResponse = exports2.FinalizeMigratedArtifactRequest = exports2.MigrateArtifactResponse = exports2.MigrateArtifactRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var wrappers_1 = require_wrappers(); var wrappers_2 = require_wrappers(); var timestamp_1 = require_timestamp(); @@ -79141,7 +85117,7 @@ var require_artifact_twirp_client = __commonJS({ var require_generated = __commonJS({ "node_modules/@actions/artifact/lib/generated/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -79154,14 +85130,14 @@ var require_generated = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar4(require_timestamp(), exports2); - __exportStar4(require_wrappers(), exports2); - __exportStar4(require_artifact(), exports2); - __exportStar4(require_artifact_twirp_client(), exports2); + __exportStar2(require_timestamp(), exports2); + __exportStar2(require_wrappers(), exports2); + __exportStar2(require_artifact(), exports2); + __exportStar2(require_artifact_twirp_client(), exports2); } }); @@ -79169,7 +85145,7 @@ var require_generated = __commonJS({ var require_retention = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/retention.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -79182,34 +85158,34 @@ var require_retention = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = getExpiration; var generated_1 = require_generated(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; @@ -79294,817 +85270,12 @@ The following characters are not allowed in files that are uploaded due to limit } }); -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js -var require_proxy4 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js -var require_lib5 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js -var require_auth3 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact/package.json var require_package3 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", - version: "4.0.0", + version: "5.0.1", preview: true, description: "Actions artifact lib", keywords: [ @@ -80144,11 +85315,10 @@ var require_package3 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.10.0", + "@actions/core": "^2.0.0", "@actions/github": "^6.0.1", - "@actions/http-client": "^2.1.0", - "@azure/core-http": "^3.0.5", - "@azure/storage-blob": "^12.15.0", + "@actions/http-client": "^3.0.0", + "@azure/storage-blob": "^12.29.1", "@octokit/core": "^5.2.1", "@octokit/plugin-request-log": "^1.0.4", "@octokit/plugin-retry": "^3.0.9", @@ -80322,10 +85492,10 @@ var require_jwt_decode_cjs = __commonJS({ }); // node_modules/@actions/artifact/lib/internal/shared/util.js -var require_util11 = __commonJS({ +var require_util10 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -80338,40 +85508,40 @@ var require_util11 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = getBackendIdsFromToken; exports2.maskSigUrl = maskSigUrl; exports2.maskSecretUrls = maskSecretUrls; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var config_1 = require_config2(); - var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); + var jwt_decode_1 = __importDefault2(require_jwt_decode_cjs()); var core_1 = require_core(); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); function getBackendIdsFromToken() { @@ -80435,7 +85605,7 @@ var require_util11 = __commonJS({ var require_artifact_twirp_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/artifact-twirp-client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -80464,14 +85634,14 @@ var require_artifact_twirp_client2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.internalArtifactTwirpClient = internalArtifactTwirpClient; - var http_client_1 = require_lib5(); - var auth_1 = require_auth3(); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); var core_1 = require_core(); var generated_1 = require_generated(); var config_1 = require_config2(); var user_agent_1 = require_user_agent2(); var errors_1 = require_errors3(); - var util_1 = require_util11(); + var util_1 = require_util10(); var ArtifactHttpClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -80495,14 +85665,14 @@ var require_artifact_twirp_client2 = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -80512,7 +85682,7 @@ var require_artifact_twirp_client2 = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -80583,7 +85753,7 @@ var require_artifact_twirp_client2 = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } @@ -80610,7 +85780,7 @@ var require_artifact_twirp_client2 = __commonJS({ var require_upload_zip_specification = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-zip-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -80623,34 +85793,34 @@ var require_upload_zip_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - var fs2 = __importStar4(require("fs")); + var fs2 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); @@ -80704,7 +85874,7 @@ var require_upload_zip_specification = __commonJS({ var require_blob_upload = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/blob-upload.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -80717,31 +85887,31 @@ var require_blob_upload = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -80770,18 +85940,18 @@ var require_blob_upload = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadZipToBlobStorage = uploadZipToBlobStorage; - var storage_blob_1 = require_dist7(); + var storage_blob_1 = require_commonjs15(); var config_1 = require_config2(); - var core14 = __importStar4(require_core()); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); + var core14 = __importStar2(require_core()); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); var errors_1 = require_errors3(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let uploadByteCount = 0; let lastProgressTime = Date.now(); const abortController = new AbortController(); - const chunkTimer = (interval) => __awaiter4(this, void 0, void 0, function* () { + const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { @@ -80811,7 +85981,7 @@ var require_blob_upload = __commonJS({ }; let sha256Hash = void 0; const uploadStream = new stream.PassThrough(); - const hashStream = crypto.createHash("sha256"); + const hashStream = crypto2.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); core14.info("Beginning upload of artifact content to blob storage"); @@ -82701,8 +87871,8 @@ var require_async = __commonJS({ var mapLimit$1 = awaitify(mapLimit, 4); function concatLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, ...args) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { if (err) return iterCb(err); return iterCb(err, args); }); @@ -82908,10 +88078,10 @@ var require_async = __commonJS({ var forever$1 = awaitify(forever, 2); function groupByLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, key) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { if (err) return iterCb(err); - return iterCb(err, { key, val: val2 }); + return iterCb(err, { key, val }); }); }, (err, mapResults) => { var result = {}; @@ -82919,11 +88089,11 @@ var require_async = __commonJS({ for (var i = 0; i < mapResults.length; i++) { if (mapResults[i]) { var { key } = mapResults[i]; - var { val: val2 } = mapResults[i]; + var { val } = mapResults[i]; if (hasOwnProperty.call(result, key)) { - result[key].push(val2); + result[key].push(val); } else { - result[key] = [val2]; + result[key] = [val]; } } } @@ -82942,8 +88112,8 @@ var require_async = __commonJS({ callback = once(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); - return eachOfLimit$2(limit)(obj, (val2, key, next) => { - _iteratee(val2, key, (err, result) => { + return eachOfLimit$2(limit)(obj, (val, key, next) => { + _iteratee(val, key, (err, result) => { if (err) return next(err); newObj[key] = result; next(err); @@ -84263,8 +89433,8 @@ var require_graceful_fs = __commonJS({ get: function() { return ReadStream; }, - set: function(val2) { - ReadStream = val2; + set: function(val) { + ReadStream = val; }, enumerable: true, configurable: true @@ -84273,8 +89443,8 @@ var require_graceful_fs = __commonJS({ get: function() { return WriteStream; }, - set: function(val2) { - WriteStream = val2; + set: function(val) { + WriteStream = val; }, enumerable: true, configurable: true @@ -84284,8 +89454,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileReadStream; }, - set: function(val2) { - FileReadStream = val2; + set: function(val) { + FileReadStream = val; }, enumerable: true, configurable: true @@ -84295,8 +89465,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileWriteStream; }, - set: function(val2) { - FileWriteStream = val2; + set: function(val) { + FileWriteStream = val; }, enumerable: true, configurable: true @@ -84550,7 +89720,7 @@ var require_safe_buffer = __commonJS({ }); // node_modules/core-util-is/lib/util.js -var require_util12 = __commonJS({ +var require_util11 = __commonJS({ "node_modules/core-util-is/lib/util.js"(exports2) { function isArray(arg) { if (Array.isArray) { @@ -84832,7 +90002,7 @@ var require_stream_writable = __commonJS({ var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() @@ -85268,7 +90438,7 @@ var require_stream_duplex = __commonJS({ return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var Readable = require_stream_readable(); var Writable = require_stream_writable(); @@ -85593,7 +90763,7 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); var debugUtil = require("util"); var debug4 = void 0; @@ -86262,7 +91432,7 @@ var require_stream_transform = __commonJS({ "use strict"; module2.exports = Transform; var Duplex = require_stream_duplex(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(Transform, Duplex); function afterTransform(er, data) { @@ -86362,7 +91532,7 @@ var require_stream_passthrough = __commonJS({ "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform(); - var util = Object.create(require_util12()); + var util = Object.create(require_util11()); util.inherits = require_inherits(); util.inherits(PassThrough, Transform); function PassThrough(options) { @@ -87280,8 +92450,8 @@ var require_primordials = __commonJS({ PromiseReject(err) { return Promise.reject(err); }, - PromiseResolve(val2) { - return Promise.resolve(val2); + PromiseResolve(val) { + return Promise.resolve(val); }, ReflectApply: Reflect.apply, RegExpPrototypeTest(self2, value) { @@ -87986,7 +93156,7 @@ var require_abort_controller = __commonJS({ }); // node_modules/readable-stream/lib/ours/util.js -var require_util13 = __commonJS({ +var require_util12 = __commonJS({ "node_modules/readable-stream/lib/ours/util.js"(exports2, module2) { "use strict"; var bufferModule = require("buffer"); @@ -88177,7 +93347,7 @@ var require_util13 = __commonJS({ var require_errors4 = __commonJS({ "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; - var { format, inspect, AggregateError: CustomAggregateError } = require_util13(); + var { format, inspect, AggregateError: CustomAggregateError } = require_util12(); var AggregateError = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); var kTypes = [ @@ -88200,14 +93370,14 @@ var require_errors4 = __commonJS({ throw new codes.ERR_INTERNAL_ASSERTION(message); } } - function addNumericalSeparator(val2) { + function addNumericalSeparator(val) { let res = ""; - let i = val2.length; - const start = val2[0] === "-" ? 1 : 0; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; for (; i >= start + 4; i -= 3) { - res = `_${val2.slice(i - 3, i)}${res}`; + res = `_${val.slice(i - 3, i)}${res}`; } - return `${val2.slice(0, i)}${res}`; + return `${val.slice(0, i)}${res}`; } function getMessage(key, msg, args) { if (typeof msg === "function") { @@ -88513,8 +93683,8 @@ var require_validators = __commonJS({ hideStackFrames, codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } } = require_errors4(); - var { normalizeEncoding } = require_util13(); - var { isAsyncFunction, isArrayBufferView } = require_util13().types; + var { normalizeEncoding } = require_util12(); + var { isAsyncFunction, isArrayBufferView } = require_util12().types; var signals = {}; function isInt32(value) { return value === (value | 0); @@ -88761,7 +93931,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils6 = __commonJS({ +var require_utils8 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -88975,7 +94145,7 @@ var require_end_of_stream = __commonJS({ var process2 = require_process(); var { AbortError, codes } = require_errors4(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once } = require_util13(); + var { kEmptyObject, once } = require_util12(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -88993,7 +94163,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils6(); + } = require_utils8(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -89148,7 +94318,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -89175,7 +94345,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -89231,7 +94401,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors4(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils8(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -89569,7 +94739,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors4(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils8(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -89605,7 +94775,7 @@ var require_add_abort_signal = __commonJS({ if (signal.aborted) { onAbort(); } else { - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; const disposable = addAbortListener(signal, onAbort); eos(stream, disposable[SymbolDispose]); } @@ -89620,7 +94790,7 @@ var require_buffer_list = __commonJS({ "use strict"; var { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array: Uint8Array2 } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); - var { inspect } = require_util13(); + var { inspect } = require_util12(); module2.exports = class BufferList { constructor() { this.head = null; @@ -89931,7 +95101,7 @@ var require_readable3 = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); - var debug4 = require_util13().debuglog("stream", (fn) => { + var debug4 = require_util12().debuglog("stream", (fn) => { debug4 = fn; }); var BufferList = require_buffer_list(); @@ -90676,9 +95846,9 @@ var require_readable3 = __commonJS({ const r = this._readableState; return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted; }, - set(val2) { + set(val) { if (this._readableState) { - this._readableState.readable = !!val2; + this._readableState.readable = !!val; } } }, @@ -91390,9 +96560,9 @@ var require_writable = __commonJS({ const w = this._writableState; return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended; }, - set(val2) { + set(val) { if (this._writableState) { - this._writableState.writable = !!val2; + this._writableState.writable = !!val; } } }, @@ -91506,7 +96676,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils6(); + } = require_utils8(); var eos = require_end_of_stream(); var { AbortError, @@ -91516,7 +96686,7 @@ var require_duplexify = __commonJS({ var Duplex = require_duplex(); var Readable = require_readable3(); var Writable = require_writable(); - var { createDeferredPromise } = require_util13(); + var { createDeferredPromise } = require_util12(); var from = require_from(); var Blob2 = globalThis.Blob || bufferModule.Blob; var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { @@ -91589,9 +96759,9 @@ var require_duplexify = __commonJS({ const promise = FunctionPrototypeCall( then2, value, - (val2) => { - if (val2 != null) { - throw new ERR_INVALID_RETURN_VALUE("nully", "body", val2); + (val) => { + if (val != null) { + throw new ERR_INVALID_RETURN_VALUE("nully", "body", val); } }, (err) => { @@ -91645,9 +96815,9 @@ var require_duplexify = __commonJS({ FunctionPrototypeCall( then, body, - (val2) => { - if (val2 != null) { - d.push(val2); + (val) => { + if (val != null) { + d.push(val); } d.push(null); }, @@ -92030,13 +97200,13 @@ var require_transform = __commonJS({ const rState = this._readableState; const wState = this._writableState; const length = rState.length; - this._transform(chunk, encoding, (err, val2) => { + this._transform(chunk, encoding, (err, val) => { if (err) { callback(err); return; } - if (val2 != null) { - this.push(val2); + if (val != null) { + this.push(val); } if (wState.ended || // Backwards compat. length === rState.length || // Backwards compat. @@ -92077,12 +97247,12 @@ var require_passthrough2 = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/pipeline.js -var require_pipeline3 = __commonJS({ +var require_pipeline4 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { var process2 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once } = require_util13(); + var { once } = require_util12(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -92106,7 +97276,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils6(); + } = require_utils8(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -92139,19 +97309,19 @@ var require_pipeline3 = __commonJS({ validateFunction(streams[streams.length - 1], "streams[stream.length - 1]"); return streams.pop(); } - function makeAsyncIterable(val2) { - if (isIterable(val2)) { - return val2; - } else if (isReadableNodeStream(val2)) { - return fromReadable(val2); + function makeAsyncIterable(val) { + if (isIterable(val)) { + return val; + } else if (isReadableNodeStream(val)) { + return fromReadable(val); } - throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val2); + throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); } - async function* fromReadable(val2) { + async function* fromReadable(val) { if (!Readable) { Readable = require_readable3(); } - yield* Readable.prototype[SymbolAsyncIterator].call(val2); + yield* Readable.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { let error3; @@ -92251,7 +97421,7 @@ var require_pipeline3 = __commonJS({ function abort() { finishImpl(new AbortError()); } - addAbortListener = addAbortListener || require_util13().addAbortListener; + addAbortListener = addAbortListener || require_util12().addAbortListener; let disposable; if (outerSignal) { disposable = addAbortListener(outerSignal, abort); @@ -92352,10 +97522,10 @@ var require_pipeline3 = __commonJS({ finishCount++; then.call( ret, - (val2) => { - value = val2; - if (val2 != null) { - pt.write(val2); + (val) => { + value = val; + if (val != null) { + pt.write(val); } if (end) { pt.end(); @@ -92508,7 +97678,7 @@ var require_pipeline3 = __commonJS({ var require_compose = __commonJS({ "node_modules/readable-stream/lib/internal/streams/compose.js"(exports2, module2) { "use strict"; - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var Duplex = require_duplex(); var { destroyer } = require_destroy2(); var { @@ -92519,7 +97689,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils6(); + } = require_utils8(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -92712,8 +97882,8 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils6(); - var { deprecate } = require_util13(); + var { isWritable, isNodeStream } = require_utils8(); + var { deprecate } = require_util12(); var { ArrayPrototypePush, Boolean: Boolean2, @@ -92766,7 +97936,7 @@ var require_operators = __commonJS({ validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; return async function* map3() { - const signal = require_util13().AbortSignalAny( + const signal = require_util12().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); const stream = this; @@ -92794,7 +97964,7 @@ var require_operators = __commonJS({ } async function pump() { try { - for await (let val2 of stream) { + for await (let val of stream) { if (done) { return; } @@ -92802,17 +97972,17 @@ var require_operators = __commonJS({ throw new AbortError(); } try { - val2 = fn(val2, signalOpt); - if (val2 === kEmpty) { + val = fn(val, signalOpt); + if (val === kEmpty) { continue; } - val2 = PromiseResolve(val2); + val = PromiseResolve(val); } catch (err) { - val2 = PromiseReject(err); + val = PromiseReject(err); } cnt += 1; - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); if (next) { next(); next = null; @@ -92825,9 +97995,9 @@ var require_operators = __commonJS({ } queue.push(kEof); } catch (err) { - const val2 = PromiseReject(err); - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + const val = PromiseReject(err); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); } finally { done = true; if (next) { @@ -92840,15 +98010,15 @@ var require_operators = __commonJS({ try { while (true) { while (queue.length > 0) { - const val2 = await queue[0]; - if (val2 === kEof) { + const val = await queue[0]; + if (val === kEof) { return; } if (signal.aborted) { throw new AbortError(); } - if (val2 !== kEmpty) { - yield val2; + if (val !== kEmpty) { + yield val; } queue.shift(); maybeResume(); @@ -92875,14 +98045,14 @@ var require_operators = __commonJS({ } return async function* asIndexedPairs2() { let index = 0; - for await (const val2 of this) { + for await (const val of this) { var _options$signal; if (options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted) { throw new AbortError({ cause: options.signal.reason }); } - yield [index++, val2]; + yield [index++, val]; } }.call(this); } @@ -93002,22 +98172,22 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } const result = []; - for await (const val2 of this) { + for await (const val of this) { var _options$signal4; if (options !== null && options !== void 0 && (_options$signal4 = options.signal) !== null && _options$signal4 !== void 0 && _options$signal4.aborted) { throw new AbortError(void 0, { cause: options.signal.reason }); } - ArrayPrototypePush(result, val2); + ArrayPrototypePush(result, val); } return result; } function flatMap(fn, options) { const values = map2.call(this, fn, options); return async function* flatMap2() { - for await (const val2 of values) { - yield* val2; + for await (const val of values) { + yield* val; } }.call(this); } @@ -93044,13 +98214,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal6; if (options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted) { throw new AbortError(); } if (number-- <= 0) { - yield val2; + yield val; } } }.call(this); @@ -93068,13 +98238,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal8; if (options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted) { throw new AbortError(); } if (number-- > 0) { - yield val2; + yield val; } if (number <= 0) { return; @@ -93107,8 +98277,8 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils6(); - var { pipelineImpl: pl } = require_pipeline3(); + var { isIterable, isNodeStream, isWebStream } = require_utils8(); + var { pipelineImpl: pl } = require_pipeline4(); var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { @@ -93151,18 +98321,18 @@ var require_stream2 = __commonJS({ var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { promisify: { custom: customPromisify } - } = require_util13(); + } = require_util12(); var { streamReturningOperators, promiseReturningOperators } = require_operators(); var { codes: { ERR_ILLEGAL_CONSTRUCTOR } } = require_errors4(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state3(); - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises = require_promises(); - var utils = require_utils6(); + var utils = require_utils8(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -94132,7 +99302,7 @@ var require_isPlainObject = __commonJS({ }); // node_modules/@isaacs/balanced-match/dist/commonjs/index.js -var require_commonjs13 = __commonJS({ +var require_commonjs18 = __commonJS({ "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -94194,12 +99364,12 @@ var require_commonjs13 = __commonJS({ }); // node_modules/@isaacs/brace-expansion/dist/commonjs/index.js -var require_commonjs14 = __commonJS({ +var require_commonjs19 = __commonJS({ "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.expand = expand; - var balanced_match_1 = require_commonjs13(); + var balanced_match_1 = require_commonjs18(); var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; @@ -95014,12 +100184,12 @@ var require_escape = __commonJS({ }); // node_modules/glob/node_modules/minimatch/dist/commonjs/index.js -var require_commonjs15 = __commonJS({ +var require_commonjs20 = __commonJS({ "node_modules/glob/node_modules/minimatch/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = require_commonjs14(); + var brace_expansion_1 = require_commonjs19(); var assert_valid_pattern_js_1 = require_assert_valid_pattern(); var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); @@ -95774,7 +100944,7 @@ var require_commonjs15 = __commonJS({ }); // node_modules/lru-cache/dist/commonjs/index.js -var require_commonjs16 = __commonJS({ +var require_commonjs21 = __commonJS({ "node_modules/lru-cache/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -96670,14 +101840,14 @@ var require_commonjs16 = __commonJS({ pop() { try { while (this.#size) { - const val2 = this.#valList[this.#head]; + const val = this.#valList[this.#head]; this.#evict(true); - if (this.#isBackgroundFetch(val2)) { - if (val2.__staleWhileFetching) { - return val2.__staleWhileFetching; + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; } - } else if (val2 !== void 0) { - return val2; + } else if (val !== void 0) { + return val; } } } finally { @@ -97168,10 +102338,10 @@ var require_commonjs16 = __commonJS({ }); // node_modules/minipass/dist/commonjs/index.js -var require_commonjs17 = __commonJS({ +var require_commonjs22 = __commonJS({ "node_modules/minipass/dist/commonjs/index.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -97181,7 +102351,7 @@ var require_commonjs17 = __commonJS({ stderr: null }; var node_events_1 = require("node:events"); - var node_stream_1 = __importDefault4(require("node:stream")); + var node_stream_1 = __importDefault2(require("node:stream")); var node_string_decoder_1 = require("node:string_decoder"); var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)); exports2.isStream = isStream; @@ -98060,10 +103230,10 @@ var require_commonjs17 = __commonJS({ }); // node_modules/path-scurry/dist/commonjs/index.js -var require_commonjs18 = __commonJS({ +var require_commonjs23 = __commonJS({ "node_modules/path-scurry/dist/commonjs/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -98076,30 +103246,30 @@ var require_commonjs18 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0; - var lru_cache_1 = require_commonjs16(); + var lru_cache_1 = require_commonjs21(); var node_path_1 = require("node:path"); var node_url_1 = require("node:url"); var fs_1 = require("fs"); - var actualFS = __importStar4(require("node:fs")); + var actualFS = __importStar2(require("node:fs")); var realpathSync = fs_1.realpathSync.native; var promises_1 = require("node:fs/promises"); - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var defaultFS = { lstatSync: fs_1.lstatSync, readdir: fs_1.readdir, @@ -99841,7 +105011,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var isPatternList = (pl) => pl.length >= 1; var isGlobList = (gl) => gl.length >= 1; var Pattern = class _Pattern { @@ -100015,7 +105185,7 @@ var require_ignore = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { @@ -100112,7 +105282,7 @@ var require_processor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var HasWalkedCache = class _HasWalkedCache { store; constructor(store = /* @__PURE__ */ new Map()) { @@ -100345,7 +105515,7 @@ var require_walker = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; @@ -100685,9 +105855,9 @@ var require_glob2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Glob = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var node_url_1 = require("node:url"); - var path_scurry_1 = require_commonjs18(); + var path_scurry_1 = require_commonjs23(); var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; @@ -100898,7 +106068,7 @@ var require_has_magic = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasMagic = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var hasMagic = (pattern, options = {}) => { if (!Array.isArray(pattern)) { pattern = [pattern]; @@ -100914,7 +106084,7 @@ var require_has_magic = __commonJS({ }); // node_modules/glob/dist/commonjs/index.js -var require_commonjs19 = __commonJS({ +var require_commonjs24 = __commonJS({ "node_modules/glob/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -100924,10 +106094,10 @@ var require_commonjs19 = __commonJS({ exports2.globSync = globSync; exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); - var minimatch_2 = require_commonjs15(); + var minimatch_2 = require_commonjs20(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { return minimatch_2.escape; } }); @@ -101004,7 +106174,7 @@ var require_file3 = __commonJS({ var difference = require_difference(); var union = require_union(); var isPlainObject = require_isPlainObject(); - var glob2 = require_commonjs19(); + var glob2 = require_commonjs24(); var file = module2.exports = {}; var pathSeparatorRe = /[\/\\]/g; var processPatterns = function(patterns, fn) { @@ -101268,7 +106438,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error2 = __commonJS({ +var require_error3 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -101301,7 +106471,7 @@ var require_error2 = __commonJS({ }); // node_modules/archiver/lib/core.js -var require_core2 = __commonJS({ +var require_core3 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs2 = require("fs"); var glob2 = require_readdir_glob(); @@ -101309,7 +106479,7 @@ var require_core2 = __commonJS({ var path2 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error2(); + var ArchiverError = require_error3(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -101852,7 +107022,7 @@ var require_archive_entry = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/util.js -var require_util14 = __commonJS({ +var require_util13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { var util = module2.exports = {}; util.dateToDos = function(d, forceLocalTime) { @@ -101863,7 +107033,7 @@ var require_util14 = __commonJS({ } else if (year >= 2044) { return 2141175677; } - var val2 = { + var val = { year, month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), date: forceLocalTime ? d.getDate() : d.getUTCDate(), @@ -101871,7 +107041,7 @@ var require_util14 = __commonJS({ minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() }; - return val2.year - 1980 << 25 | val2.month + 1 << 21 | val2.date << 16 | val2.hours << 11 | val2.minutes << 5 | val2.seconds / 2; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; }; util.dosToDate = function(dos) { return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); @@ -101910,7 +107080,7 @@ var require_util14 = __commonJS({ // node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js var require_general_purpose_bit = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { - var zipUtil = require_util14(); + var zipUtil = require_util13(); var DATA_DESCRIPTOR_FLAG = 1 << 3; var ENCRYPTION_FLAG = 1 << 0; var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; @@ -102037,7 +107207,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants9 = __commonJS({ +var require_constants13 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -102121,8 +107291,8 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants9(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var zipUtil = require_util13(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { return new ZipArchiveEntry(name); @@ -102302,7 +107472,7 @@ var require_is_stream2 = __commonJS({ }); // node_modules/compress-commons/lib/util/index.js -var require_util15 = __commonJS({ +var require_util14 = __commonJS({ "node_modules/compress-commons/lib/util/index.js"(exports2, module2) { var Stream = require("stream").Stream; var PassThrough = require_ours().PassThrough; @@ -102330,7 +107500,7 @@ var require_archive_output_stream = __commonJS({ var isStream = require_is_stream2(); var Transform = require_ours().Transform; var ArchiveEntry = require_archive_entry(); - var util = require_util15(); + var util = require_util14(); var ArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ArchiveOutputStream)) { return new ArchiveOutputStream(options); @@ -102593,7 +107763,7 @@ var require_deflate_crc32_stream = __commonJS({ }); // node_modules/crc32-stream/lib/index.js -var require_lib6 = __commonJS({ +var require_lib5 = __commonJS({ "node_modules/crc32-stream/lib/index.js"(exports2, module2) { "use strict"; module2.exports = { @@ -102608,14 +107778,14 @@ var require_zip_archive_output_stream = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { var inherits = require("util").inherits; var crc32 = require_crc32(); - var { CRC32Stream } = require_lib6(); - var { DeflateCRC32Stream } = require_lib6(); + var { CRC32Stream } = require_lib5(); + var { DeflateCRC32Stream } = require_lib5(); var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants9(); - var util = require_util15(); - var zipUtil = require_util14(); + var constants = require_constants13(); + var util = require_util14(); + var zipUtil = require_util13(); var ZipArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ZipArchiveOutputStream)) { return new ZipArchiveOutputStream(options); @@ -103113,29 +108283,29 @@ var require_fast_fifo = __commonJS({ this.head.clear(); this.length = 0; } - push(val2) { + push(val) { this.length++; - if (!this.head.push(val2)) { + if (!this.head.push(val)) { const prev = this.head; this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length); - this.head.push(val2); + this.head.push(val); } } shift() { if (this.length !== 0) this.length--; - const val2 = this.tail.shift(); - if (val2 === void 0 && this.tail.next) { + const val = this.tail.shift(); + if (val === void 0 && this.tail.next) { const next = this.tail.next; this.tail.next = null; this.tail = next; return this.tail.shift(); } - return val2; + return val; } peek() { - const val2 = this.tail.peek(); - if (val2 === void 0 && this.tail.next) return this.tail.next.peek(); - return val2; + const val = this.tail.peek(); + if (val === void 0 && this.tail.next) return this.tail.next.peek(); + return val; } isEmpty() { return this.length === 0; @@ -104613,10 +109783,10 @@ var require_headers2 = __commonJS({ for (let j = 156; j < 512; j++) sum += block[j]; return sum; } - function encodeOct(val2, n) { - val2 = val2.toString(8); - if (val2.length > n) return SEVENS.slice(0, n) + " "; - return ZEROS.slice(0, n - val2.length) + val2 + " "; + function encodeOct(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + return ZEROS.slice(0, n - val.length) + val + " "; } function encodeSizeBin(num, buf, off) { buf[off] = 128; @@ -104651,21 +109821,21 @@ var require_headers2 = __commonJS({ } return positive ? sum : -1 * sum; } - function decodeOct(val2, offset, length) { - val2 = val2.subarray(offset, offset + length); + function decodeOct(val, offset, length) { + val = val.subarray(offset, offset + length); offset = 0; - if (val2[offset] & 128) { - return parse256(val2); + if (val[offset] & 128) { + return parse256(val); } else { - while (offset < val2.length && val2[offset] === 32) offset++; - const end = clamp(indexOf(val2, 32, offset, val2.length), val2.length, val2.length); - while (offset < end && val2[offset] === 0) offset++; + while (offset < val.length && val[offset] === 32) offset++; + const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; if (end === offset) return 0; - return parseInt(b4a.toString(val2.subarray(offset, end)), 8); + return parseInt(b4a.toString(val.subarray(offset, end)), 8); } } - function decodeStr(val2, offset, length, encoding) { - return b4a.toString(val2.subarray(offset, indexOf(val2, 0, offset, offset + length)), encoding); + function decodeStr(val, offset, length, encoding) { + return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding); } function addLength(str2) { const len = b4a.byteLength(str2); @@ -105011,7 +110181,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants10 = __commonJS({ +var require_constants14 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -105035,7 +110205,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants10(); + var constants = require_constants14(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -105351,7 +110521,7 @@ var require_tar2 = __commonJS({ }); // node_modules/buffer-crc32/dist/index.cjs -var require_dist8 = __commonJS({ +var require_dist5 = __commonJS({ "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) { "use strict"; function getDefaultExportFromCjs(x) { @@ -105663,7 +110833,7 @@ var require_json = __commonJS({ "node_modules/archiver/lib/plugins/json.js"(exports2, module2) { var inherits = require("util").inherits; var Transform = require_ours().Transform; - var crc32 = require_dist8(); + var crc32 = require_dist5(); var util = require_archiver_utils(); var Json = function(options) { if (!(this instanceof Json)) { @@ -105715,7 +110885,7 @@ var require_json = __commonJS({ // node_modules/archiver/index.js var require_archiver = __commonJS({ "node_modules/archiver/index.js"(exports2, module2) { - var Archiver = require_core2(); + var Archiver = require_core3(); var formats = {}; var vending = function(format, options) { return vending.create(format, options); @@ -105759,7 +110929,7 @@ var require_archiver = __commonJS({ var require_zip2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -105772,31 +110942,31 @@ var require_zip2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -105826,10 +110996,10 @@ var require_zip2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; exports2.createZipUploadStream = createZipUploadStream; - var stream = __importStar4(require("stream")); + var stream = __importStar2(require("stream")); var promises_1 = require("fs/promises"); - var archiver2 = __importStar4(require_archiver()); - var core14 = __importStar4(require_core()); + var archiver2 = __importStar2(require_archiver()); + var core14 = __importStar2(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -105845,7 +111015,7 @@ var require_zip2 = __commonJS({ }; exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification_1) { - return __awaiter4(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { + return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), @@ -105904,7 +111074,7 @@ var require_zip2 = __commonJS({ var require_upload_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -105917,31 +111087,31 @@ var require_upload_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -105970,18 +111140,18 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = uploadArtifact; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var upload_zip_specification_1 = require_upload_zip_specification(); - var util_1 = require_util11(); + var util_1 = require_util10(); var blob_upload_1 = require_blob_upload(); var zip_1 = require_zip2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, path_and_artifact_name_validation_1.validateArtifactName)(name); (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory); const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory); @@ -106953,18 +112123,18 @@ var require_binary = __commonJS({ return acc; } function decodeBEs(bytes) { - var val2 = decodeBEu(bytes); + var val = decodeBEu(bytes); if ((bytes[0] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function decodeLEs(bytes) { - var val2 = decodeLEu(bytes); + var val = decodeLEu(bytes); if ((bytes[bytes.length - 1] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function words(decode) { var self2 = {}; @@ -107913,7 +113083,7 @@ var require_unzip = __commonJS({ var require_download_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/download/download-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -107926,31 +113096,31 @@ var require_download_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -107977,25 +113147,25 @@ var require_download_artifact = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.streamExtractExternal = streamExtractExternal; exports2.downloadArtifactPublic = downloadArtifactPublic; exports2.downloadArtifactInternal = downloadArtifactInternal; - var promises_1 = __importDefault4(require("fs/promises")); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); - var github2 = __importStar4(require_github()); - var core14 = __importStar4(require_core()); - var httpClient = __importStar4(require_lib5()); - var unzip_stream_1 = __importDefault4(require_unzip()); + var promises_1 = __importDefault2(require("fs/promises")); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); + var github2 = __importStar2(require_github()); + var core14 = __importStar2(require_core()); + var httpClient = __importStar2(require_lib()); + var unzip_stream_1 = __importDefault2(require_unzip()); var user_agent_1 = require_user_agent2(); var config_1 = require_config2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); - var util_1 = require_util11(); + var util_1 = require_util10(); var errors_1 = require_errors3(); var scrubQueryParameters = (url) => { const parsed = new URL(url); @@ -108003,7 +113173,7 @@ var require_download_artifact = __commonJS({ return parsed.toString(); }; function exists(path2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { yield promises_1.default.access(path2); return true; @@ -108017,7 +113187,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtract(url, directory) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { @@ -108032,7 +113202,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtractExternal(url_1, directory_1) { - return __awaiter4(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { + return __awaiter2(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); const response = yield client.get(url); if (response.message.statusCode !== 200) { @@ -108046,7 +113216,7 @@ var require_download_artifact = __commonJS({ reject(timeoutError); }; const timer = setTimeout(timerFn, opts.timeout); - const hashStream = crypto.createHash("sha256").setEncoding("hex"); + const hashStream = crypto2.createHash("sha256").setEncoding("hex"); const passThrough = new stream.PassThrough(); response.message.pipe(passThrough); passThrough.pipe(hashStream); @@ -108072,7 +113242,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; @@ -108112,7 +113282,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactInternal(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); let digestMismatch = false; @@ -108155,7 +113325,7 @@ Are you trying to download from a different run? Try specifying a github-token w }); } function resolveOrCreateDirectory() { - return __awaiter4(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { + return __awaiter2(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { if (!(yield exists(downloadPath))) { core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); @@ -108172,7 +113342,7 @@ Are you trying to download from a different run? Try specifying a github-token w var require_retry_options = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/retry-options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108185,33 +113355,33 @@ var require_retry_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = getRetryOptions; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -108324,7 +113494,7 @@ var require_dist_node17 = __commonJS({ var require_get_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/get-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108337,31 +113507,31 @@ var require_get_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -108393,17 +113563,17 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = getArtifactInternal; var github_1 = require_github(); var plugin_retry_1 = require_dist_node17(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var utils_1 = require_utils4(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node16(); - var util_1 = require_util11(); + var util_1 = require_util10(); var user_agent_1 = require_user_agent2(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); var generated_1 = require_generated(); var errors_1 = require_errors3(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -108445,7 +113615,7 @@ var require_get_artifact = __commonJS({ }); } function getArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); @@ -108483,7 +113653,7 @@ var require_get_artifact = __commonJS({ var require_delete_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/delete/delete-artifact.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -108521,12 +113691,12 @@ var require_delete_artifact = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var generated_1 = require_generated(); var get_artifact_1 = require_get_artifact(); var errors_1 = require_errors3(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -108552,7 +113722,7 @@ var require_delete_artifact = __commonJS({ }); } function deleteArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const listReq = { @@ -108588,7 +113758,7 @@ var require_delete_artifact = __commonJS({ var require_list_artifacts = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/list-artifacts.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -108626,14 +113796,14 @@ var require_list_artifacts = __commonJS({ var plugin_request_log_1 = require_dist_node16(); var plugin_retry_1 = require_dist_node17(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); - var util_1 = require_util11(); + var util_1 = require_util10(); var config_1 = require_config2(); var generated_1 = require_generated(); var maximumArtifactCount = (0, config_1.getMaxArtifactListCount)(); var paginationCount = 100; var maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount); function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) { - return __awaiter4(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { + return __awaiter2(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { (0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); let artifacts = []; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); @@ -108698,7 +113868,7 @@ var require_list_artifacts = __commonJS({ }); } function listArtifactsInternal() { - return __awaiter4(this, arguments, void 0, function* (latest = false) { + return __awaiter2(this, arguments, void 0, function* (latest = false) { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const req = { @@ -108744,7 +113914,7 @@ var require_list_artifacts = __commonJS({ var require_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -108771,7 +113941,7 @@ var require_client2 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __rest4 = exports2 && exports2.__rest || function(s, e) { + var __rest2 = exports2 && exports2.__rest || function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -108794,7 +113964,7 @@ var require_client2 = __commonJS({ var errors_1 = require_errors3(); var DefaultArtifactClient2 = class { uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -108811,13 +113981,13 @@ If the error persists, please check whether Actions is operating normally at [ht }); } downloadArtifact(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); } if (options === null || options === void 0 ? void 0 : options.findBy) { - const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest4(options, ["findBy"]); + const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest2(options, ["findBy"]); return (0, download_artifact_1.downloadArtifactPublic)(artifactId, repositoryOwner, repositoryName, token, downloadOptions); } return (0, download_artifact_1.downloadArtifactInternal)(artifactId, options); @@ -108832,7 +114002,7 @@ If the error persists, please check whether Actions and API requests are operati }); } listArtifacts(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -108853,7 +114023,7 @@ If the error persists, please check whether Actions and API requests are operati }); } getArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -108874,7 +114044,7 @@ If the error persists, please check whether Actions and API requests are operati }); } deleteArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -108911,7 +114081,7 @@ var require_interfaces2 = __commonJS({ var require_artifact2 = __commonJS({ "node_modules/@actions/artifact/lib/artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108924,26 +114094,2815 @@ var require_artifact2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var client_1 = require_client2(); - __exportStar4(require_interfaces2(), exports2); - __exportStar4(require_errors3(), exports2); - __exportStar4(require_client2(), exports2); + __exportStar2(require_interfaces2(), exports2); + __exportStar2(require_errors3(), exports2); + __exportStar2(require_client2(), exports2); var client = new client_1.DefaultArtifactClient(); exports2.default = client; } }); +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js +var require_utils9 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils9(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils9(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js +var require_proxy4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib6(); + var auth_1 = require_auth3(); + var core_1 = require_core4(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js +var require_core4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils9(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed; + function isDebug3() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug3; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState3(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState3; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + // node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js var require_path_and_artifact_name_validation2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.checkArtifactFilePath = exports2.checkArtifactName = void 0; - var core_1 = require_core(); + var core_1 = require_core4(); var invalidArtifactFilePathCharacters = /* @__PURE__ */ new Map([ ['"', ' Double quote "'], [":", " Colon :"], @@ -108999,7 +116958,7 @@ The following characters are not allowed in files that are uploaded due to limit var require_upload_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109012,24 +116971,24 @@ var require_upload_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs2 = __importStar4(require("fs")); - var core_1 = require_core(); + var fs2 = __importStar2(require("fs")); + var core_1 = require_core4(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { @@ -109074,7 +117033,7 @@ var require_tmp = __commonJS({ var fs2 = require("fs"); var os = require("os"); var path2 = require("path"); - var crypto = require("crypto"); + var crypto2 = require("crypto"); var _c = { fs: fs2.constants, os: os.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; @@ -109254,9 +117213,9 @@ var require_tmp = __commonJS({ function _randomChars(howMany) { let value = [], rnd = null; try { - rnd = crypto.randomBytes(howMany); + rnd = crypto2.randomBytes(howMany); } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); + rnd = crypto2.pseudoRandomBytes(howMany); } for (let i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); @@ -109471,811 +117430,6 @@ var require_tmp_promise = __commonJS({ } }); -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js -var require_lib7 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js -var require_auth4 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact-legacy/lib/internal/config-variables.js var require_config_variables = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/config-variables.js"(exports2) { @@ -110648,10 +117802,10 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils7 = __commonJS({ +var require_utils10 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -110678,18 +117832,18 @@ var require_utils7 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.digestForStream = exports2.sleep = exports2.getProperRetention = exports2.rmFile = exports2.getFileSize = exports2.createEmptyFilesForArtifact = exports2.createDirectoriesForArtifact = exports2.displayHttpDiagnostics = exports2.getArtifactUrl = exports2.createHttpClient = exports2.getUploadHeaders = exports2.getDownloadHeaders = exports2.getContentRange = exports2.tryGetRetryAfterValueTimeInMilliseconds = exports2.isThrottledStatusCode = exports2.isRetryableStatusCode = exports2.isForbiddenStatusCode = exports2.isSuccessStatusCode = exports2.getApiVersion = exports2.parseEnvNumber = exports2.getExponentialRetryTimeInMilliseconds = void 0; - var crypto_1 = __importDefault4(require("crypto")); + var crypto_1 = __importDefault2(require("crypto")); var fs_1 = require("fs"); - var core_1 = require_core(); - var http_client_1 = require_lib7(); - var auth_1 = require_auth4(); + var core_1 = require_core4(); + var http_client_1 = require_lib6(); + var auth_1 = require_auth3(); var config_variables_1 = require_config_variables(); - var crc64_1 = __importDefault4(require_crc64()); + var crc64_1 = __importDefault2(require_crc64()); function getExponentialRetryTimeInMilliseconds(retryCount) { if (retryCount < 0) { throw new Error("RetryCount should not be negative"); @@ -110835,7 +117989,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.displayHttpDiagnostics = displayHttpDiagnostics; function createDirectoriesForArtifact(directories) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const directory of directories) { yield fs_1.promises.mkdir(directory, { recursive: true @@ -110845,7 +117999,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createDirectoriesForArtifact = createDirectoriesForArtifact; function createEmptyFilesForArtifact(emptyFilesToCreate) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const filePath of emptyFilesToCreate) { yield (yield fs_1.promises.open(filePath, "w")).close(); } @@ -110853,7 +118007,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createEmptyFilesForArtifact = createEmptyFilesForArtifact; function getFileSize(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const stats = yield fs_1.promises.stat(filePath); (0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`); return stats.size; @@ -110861,7 +118015,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getFileSize = getFileSize; function rmFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield fs_1.promises.unlink(filePath); }); } @@ -110882,13 +118036,13 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getProperRetention = getProperRetention; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { const crc64 = new crc64_1.default(); const md5 = crypto_1.default.createHash("md5"); @@ -110912,7 +118066,7 @@ var require_status_reporter = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StatusReporter = void 0; - var core_1 = require_core(); + var core_1 = require_core4(); var StatusReporter = class { constructor(displayFrequencyInMilliseconds) { this.totalNumberOfFilesToProcess = 0; @@ -110958,7 +118112,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils7(); + var utils_1 = require_utils10(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -110990,7 +118144,7 @@ var require_http_manager = __commonJS({ var require_upload_gzip = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-gzip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111003,21 +118157,21 @@ var require_upload_gzip = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111044,7 +118198,7 @@ var require_upload_gzip = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -111065,8 +118219,8 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs2 = __importStar4(require("fs")); - var zlib = __importStar4(require("zlib")); + var fs2 = __importStar2(require("fs")); + var zlib = __importStar2(require("zlib")); var util_1 = require("util"); var stat = (0, util_1.promisify)(fs2.stat); var gzipExemptFileExtensions = [ @@ -111094,7 +118248,7 @@ var require_upload_gzip = __commonJS({ // 7ZIP ]; function createGZipFileOnDisk(originalFilePath, tempFilePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const gzipExemptExtension of gzipExemptFileExtensions) { if (originalFilePath.endsWith(gzipExemptExtension)) { return Number.MAX_SAFE_INTEGER; @@ -111105,7 +118259,7 @@ var require_upload_gzip = __commonJS({ const gzip = zlib.createGzip(); const outputStream = fs2.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); - outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { + outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; resolve2(size); })); @@ -111118,15 +118272,15 @@ var require_upload_gzip = __commonJS({ } exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; const inputStream = fs2.createReadStream(originalFilePath); const gzip = zlib.createGzip(); inputStream.pipe(gzip); const chunks = []; try { - for (var _d = true, gzip_1 = __asyncValues4(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { + for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { _c = gzip_1_1.value; _d = false; try { @@ -111157,7 +118311,7 @@ var require_upload_gzip = __commonJS({ var require_requestUtils2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111170,21 +118324,21 @@ var require_requestUtils2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111213,11 +118367,11 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils7(); - var core14 = __importStar4(require_core()); + var utils_1 = require_utils10(); + var core14 = __importStar2(require_core4()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let response = void 0; let statusCode = void 0; let isRetryable = false; @@ -111262,7 +118416,7 @@ var require_requestUtils2 = __commonJS({ } exports2.retry = retry3; function retryHttpClientRequest(name, method, customErrorMessages = /* @__PURE__ */ new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield retry3(name, method, customErrorMessages, maxAttempts); }); } @@ -111274,7 +118428,7 @@ var require_requestUtils2 = __commonJS({ var require_upload_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111287,21 +118441,21 @@ var require_upload_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111330,17 +118484,17 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs2 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var tmp = __importStar4(require_tmp_promise()); - var stream = __importStar4(require("stream")); - var utils_1 = require_utils7(); + var fs2 = __importStar2(require("fs")); + var core14 = __importStar2(require_core4()); + var tmp = __importStar2(require_tmp_promise()); + var stream = __importStar2(require("stream")); + var utils_1 = require_utils10(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); var perf_hooks_1 = require("perf_hooks"); var status_reporter_1 = require_status_reporter(); - var http_client_1 = require_lib7(); + var http_client_1 = require_lib6(); var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils2(); @@ -111356,7 +118510,7 @@ var require_upload_http_client = __commonJS({ * @returns The response from the Artifact Service if the file container was successfully created */ createArtifactInFileContainer(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const parameters = { Type: "actions_storage", Name: artifactName @@ -111379,7 +118533,7 @@ var require_upload_http_client = __commonJS({ `The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter2(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages); const body = yield response.readBody(); @@ -111393,7 +118547,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of all the files uploaded in bytes */ uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); @@ -111423,7 +118577,7 @@ var require_upload_http_client = __commonJS({ let abortPendingFileUploads = false; this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length); this.statusReporter.start(); - yield Promise.all(parallelUploads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < filesToUpload.length) { const currentFileParameters = parameters[currentFile]; currentFile += 1; @@ -111466,7 +118620,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of the file that was uploaded in bytes along with any failed uploads */ uploadFileAsync(httpClientIndex, parameters) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileStat = yield stat(parameters.file); const totalFileSize = fileStat.size; const isFIFO = fileStat.isFIFO(); @@ -111567,10 +118721,10 @@ var require_upload_http_client = __commonJS({ * @returns if the chunk was successfully uploaded */ uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const digest = yield (0, utils_1.digestForStream)(openStream()); const headers = (0, utils_1.getUploadHeaders)("application/octet-stream", true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest); - const uploadChunkRequest = () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.uploadHttpManager.getClient(httpClientIndex); return yield client.sendStream("PUT", resourceUrl, openStream(), headers); }); @@ -111587,7 +118741,7 @@ var require_upload_http_client = __commonJS({ } return false; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); @@ -111636,7 +118790,7 @@ var require_upload_http_client = __commonJS({ * Updating the size indicates that we are done uploading all the contents of the artifact */ patchArtifactSize(size, artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)()); resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; @@ -111650,7 +118804,7 @@ var require_upload_http_client = __commonJS({ `An Artifact with the name ${artifactName} was not found` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter2(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); @@ -111666,7 +118820,7 @@ var require_upload_http_client = __commonJS({ var require_download_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111679,21 +118833,21 @@ var require_download_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111722,10 +118876,10 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs2 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils7(); + var fs2 = __importStar2(require("fs")); + var core14 = __importStar2(require_core4()); + var zlib = __importStar2(require("zlib")); + var utils_1 = require_utils10(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -111741,11 +118895,11 @@ var require_download_http_client = __commonJS({ * Gets a list of all artifacts that are in a specific container */ listArtifacts() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactUrl = (0, utils_1.getArtifactUrl)(); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter2(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); })); const body = yield response.readBody(); @@ -111758,12 +118912,12 @@ var require_download_http_client = __commonJS({ * @param containerUrl the artifact container URL for the run */ getContainerItems(artifactName, containerUrl) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL(containerUrl); resourceUrl.searchParams.append("itemPath", artifactName); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter2(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); })); const body = yield response.readBody(); @@ -111775,7 +118929,7 @@ var require_download_http_client = __commonJS({ * @param downloadItems information about what items to download and where to save them */ downloadSingleArtifact(downloadItems) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; @@ -111784,7 +118938,7 @@ var require_download_http_client = __commonJS({ core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); - yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelDownloads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < downloadItems.length) { const currentFileToDownload = downloadItems[currentFile]; currentFile += 1; @@ -111810,19 +118964,19 @@ var require_download_http_client = __commonJS({ * @param downloadPath destination location for the file being downloaded */ downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); let destinationStream = fs2.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); - const makeDownloadRequest = () => __awaiter4(this, void 0, void 0, function* () { + const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); return yield client.get(artifactLocation, headers); }); const isGzip = (incomingHeaders) => { return "content-encoding" in incomingHeaders && incomingHeaders["content-encoding"] === "gzip"; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { retryCount++; if (retryCount > retryLimit) { return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${artifactLocation}`)); @@ -111846,7 +119000,7 @@ var require_download_http_client = __commonJS({ } return parseInt(expected) === received; }; - const resetDestinationStream = (fileDownloadPath) => __awaiter4(this, void 0, void 0, function* () { + const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); yield new Promise((resolve2) => { destinationStream.on("close", resolve2); @@ -111899,7 +119053,7 @@ var require_download_http_client = __commonJS({ * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it */ pipeResponseToFile(response, destinationStream, isGzip) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield new Promise((resolve2, reject) => { if (isGzip) { const gunzip = zlib.createGunzip(); @@ -111943,7 +119097,7 @@ var require_download_http_client = __commonJS({ var require_download_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111956,23 +119110,23 @@ var require_download_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path2 = __importStar4(require("path")); + var path2 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { @@ -112009,7 +119163,7 @@ var require_download_specification = __commonJS({ var require_artifact_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/artifact-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112022,21 +119176,21 @@ var require_artifact_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -112065,10 +119219,10 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core4()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils7(); + var utils_1 = require_utils10(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -112085,7 +119239,7 @@ var require_artifact_client = __commonJS({ * Uploads an artifact */ uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); @@ -112129,7 +119283,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadArtifact(name, path2, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { @@ -112163,7 +119317,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadAllArtifacts(path2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); @@ -112217,432 +119371,43 @@ var require_artifact_client2 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils11 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112655,130 +119420,142 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils11(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os = require("os"); - var cp = require("child_process"); - var fs2 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils11(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs2.existsSync(lsbReleaseFile)) { - contents = fs2.readFileSync(lsbReleaseFile).toString(); - } else if (fs2.existsSync(osReleaseFile)) { - contents = fs2.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); // node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy6 = __commonJS({ +var require_proxy5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -112860,10 +119637,10 @@ var require_proxy6 = __commonJS({ }); // node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js -var require_lib8 = __commonJS({ +var require_lib7 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112876,21 +119653,21 @@ var require_lib8 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -112919,10 +119696,10 @@ var require_lib8 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy6()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy5()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -112997,8 +119774,8 @@ var require_lib8 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -113010,8 +119787,8 @@ var require_lib8 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -113068,42 +119845,42 @@ var require_lib8 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -113112,14 +119889,14 @@ var require_lib8 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113128,7 +119905,7 @@ var require_lib8 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113137,7 +119914,7 @@ var require_lib8 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113151,7 +119928,7 @@ var require_lib8 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -113225,7 +120002,7 @@ var require_lib8 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -113412,15 +120189,15 @@ var require_lib8 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -113478,11 +120255,507 @@ var require_lib8 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib7(); + var auth_1 = require_auth4(); + var core_1 = require_core5(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -113495,21 +120768,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io4()); + var ioUtil = __importStar2(require_io_util4()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner4()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec4()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core5 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command4(); + var file_command_1 = require_file_command4(); + var utils_1 = require_utils11(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils4(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed; + function isDebug3() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug3; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState3(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState3; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary4(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary4(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils4(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform4()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core5(); + var os = require("os"); + var cp = require("child_process"); + var fs2 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs2.existsSync(lsbReleaseFile)) { + contents = fs2.readFileSync(lsbReleaseFile).toString(); + } else if (fs2.existsSync(osReleaseFile)) { + contents = fs2.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -113538,7 +122359,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core5()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -113552,7 +122373,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -113575,7 +122396,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, seconds * 1e3)); }); } @@ -113588,7 +122409,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -113601,21 +122422,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -113644,19 +122465,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var httpm = __importStar4(require_lib8()); - var semver8 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core5()); + var io6 = __importStar2(require_io4()); + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var httpm = __importStar2(require_lib7()); + var semver8 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec4(); var retry_helper_1 = require_retry_helper(); var HTTPError = class extends Error { constructor(httpStatusCode) { @@ -113670,8 +122491,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path2.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path2.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); @@ -113679,7 +122500,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { @@ -113693,7 +122514,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs2.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -113735,7 +122556,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -113788,7 +122609,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -113832,7 +122653,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -113853,7 +122674,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -113868,7 +122689,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -113914,7 +122735,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -113925,7 +122746,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -113944,7 +122765,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -114008,7 +122829,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -114043,23 +122864,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path2.join(_getTempDirectory(), crypto.randomUUID()); + dest = path2.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -114163,771 +122984,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy7 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib9 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy7()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug4; module2.exports = function() { @@ -114955,7 +123013,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug4 = require_debug2(); + var debug4 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -115442,1103 +123500,6 @@ var require_follow_redirects = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core14.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; - } - exports2.getOptions = getOptions; - } -}); - -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname2(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path2.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname2; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path2.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path2.sep)) { - return p; - } - if (p === path2.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; - } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; - } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path2.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path2.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } - } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path2.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path2.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path2.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path2.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path2.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { - homedir = homedir || os.homedir(); - (0, assert_1.default)(homedir, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = _Pattern.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path2, level) { - this.path = path2; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs2.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs2.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs2.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs2.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path2 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs2.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto.createHash("sha256"); - const pipeline = util.promisify(stream.pipeline); - yield pipeline(fs2.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create3; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create3(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - // src/start-proxy-action-post.ts var core13 = __toESM(require_core()); @@ -116546,11 +123507,11 @@ var core13 = __toESM(require_core()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -119391,12 +126352,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { var semver4 = __toESM(require_semver2()); // src/overlay-database-utils.ts -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); // src/logging.ts var core8 = __toESM(require_core()); @@ -119621,7 +126582,7 @@ var featureConfig = { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -119683,7 +126644,7 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -119835,21 +126796,21 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib9()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob()); // src/debug-artifacts.ts async function getArtifactUploaderClient(logger, ghVariant) { diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 013993826..891605543 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os2 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs = __importStar4(require("fs")); - var os2 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve2({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path2.dirname(filePath); const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path2.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which4; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which4(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which4; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os2 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path2 = __importStar4(require("path")); - var io4 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io4 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner3 = class extends events.EventEmitter { @@ -19149,12 +19289,2833 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io4.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner3; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + function getExecOutput(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + } +}); + +// node_modules/@actions/core/lib/platform.js +var require_platform = __commonJS({ + "node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + } +}); + +// node_modules/@actions/core/lib/core.js +var require_core = __commonJS({ + "node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable4; + exports2.setSecret = setSecret2; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug5; + exports2.error = error3; + exports2.warning = warning7; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState3; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; + var command_1 = require_command(); + var file_command_1 = require_file_command(); + var utils_1 = require_utils(); + var os2 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable4(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + function setSecret2(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + function warning7(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + function info6(message) { + process.stdout.write(message + os2.EOL); + } + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + function saveState3(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + var summary_1 = require_summary(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform()); + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils3(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils3(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js +var require_proxy2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib2(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which4(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which4(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which4; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io4 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner3 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io4.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19361,11 +22322,11 @@ var require_toolrunner = __commonJS({ } }); -// node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ - "node_modules/@actions/exec/lib/exec.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -19374,21 +22335,21 @@ var require_exec = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19418,9 +22379,9 @@ var require_exec = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExecOutput = exports2.exec = void 0; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner2()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19434,7 +22395,7 @@ var require_exec = __commonJS({ exports2.exec = exec; function getExecOutput(commandLine, args, options) { var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19468,11 +22429,11 @@ var require_exec = __commonJS({ } }); -// node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ - "node_modules/@actions/core/lib/platform.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +22446,21 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19526,14 +22487,14 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +22506,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +22518,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +22534,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19587,11 +22548,11 @@ var require_platform = __commonJS({ } }); -// node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "node_modules/@actions/core/lib/core.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +22565,21 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19647,23 +22608,23 @@ var require_core = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_1 = require_utils(); - var os2 = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var oidc_utils_1 = require_oidc_utils(); + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils3(); + var os2 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable4(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable4(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } @@ -19683,14 +22644,14 @@ var require_core = __commonJS({ } exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } exports2.getInput = getInput2; function getMultilineInput(name, options) { @@ -19704,10 +22665,10 @@ var require_core = __commonJS({ function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); @@ -19764,7 +22725,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19789,20 +22750,20 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } exports2.getIDToken = getIDToken; - var summary_1 = require_summary(); + var summary_1 = require_summary2(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; } }); - var summary_2 = require_summary(); + var summary_2 = require_summary2(); Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { return summary_2.markdownSummary; } }); - var path_utils_1 = require_path_utils(); + var path_utils_1 = require_path_utils2(); Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { return path_utils_1.toPosixPath; } }); @@ -19812,428 +22773,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); - } -}); - -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which4(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which4(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which4; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } + exports2.platform = __importStar2(require_platform2()); } }); @@ -22171,7 +24711,7 @@ var require_semver2 = __commonJS({ var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -22184,21 +24724,21 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -22227,13 +24767,13 @@ var require_manifest = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver5 = __importStar4(require_semver2()); - var core_1 = require_core(); + var semver5 = __importStar2(require_semver2()); + var core_1 = require_core2(); var os2 = require("os"); var cp = require("child_process"); var fs = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const platFilter = os2.platform(); let result; let match; @@ -22306,712 +24846,11 @@ var require_manifest = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy2 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/@actions/tool-cache/lib/retry-helper.js var require_retry_helper = __commonJS({ "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -23024,21 +24863,21 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -23067,7 +24906,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core12 = __importStar4(require_core()); + var core12 = __importStar2(require_core2()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -23081,7 +24920,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -23104,7 +24943,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, seconds * 1e3)); }); } @@ -23117,7 +24956,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -23130,21 +24969,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -23173,19 +25012,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core12 = __importStar4(require_core()); - var io4 = __importStar4(require_io2()); - var crypto = __importStar4(require("crypto")); - var fs = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os2 = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var httpm = __importStar4(require_lib2()); - var semver5 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core12 = __importStar2(require_core2()); + var io4 = __importStar2(require_io2()); + var crypto2 = __importStar2(require("crypto")); + var fs = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os2 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var httpm = __importStar2(require_lib2()); + var semver5 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec2(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -23199,8 +25038,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path2.join(_getTempDirectory(), crypto2.randomUUID()); yield io4.mkdirP(path2.dirname(dest)); core12.debug(`Downloading ${url}`); core12.debug(`Destination ${dest}`); @@ -23208,7 +25047,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -23222,7 +25061,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -23264,7 +25103,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -23317,7 +25156,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -23361,7 +25200,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -23382,7 +25221,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -23397,7 +25236,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io4.which("pwsh", false); @@ -23443,7 +25282,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io4.which("unzip", true); const args = [file]; if (!core12.isDebug()) { @@ -23454,7 +25293,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir2(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver5.clean(version) || version; arch = arch || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -23473,7 +25312,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir2; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver5.clean(version) || version; arch = arch || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -23537,7 +25376,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -23572,23 +25411,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os2.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path2.join(_getTempDirectory(), crypto.randomUUID()); + dest = path2.join(_getTempDirectory(), crypto2.randomUUID()); } yield io4.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver5.clean(version) || version, arch || ""); core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -27949,36 +29788,36 @@ var require_pbkdf2 = __commonJS({ require_md(); require_util8(); var pkcs5 = forge.pkcs5 = forge.pkcs5 || {}; - var crypto; + var crypto2; if (forge.util.isNodejs && !forge.options.usePureJavaScript) { - crypto = require("crypto"); + crypto2 = require("crypto"); } module2.exports = forge.pbkdf2 = pkcs5.pbkdf2 = function(p, s, c, dkLen, md, callback) { if (typeof md === "function") { callback = md; md = null; } - if (forge.util.isNodejs && !forge.options.usePureJavaScript && crypto.pbkdf2 && (md === null || typeof md !== "object") && (crypto.pbkdf2Sync.length > 4 || (!md || md === "sha1"))) { + if (forge.util.isNodejs && !forge.options.usePureJavaScript && crypto2.pbkdf2 && (md === null || typeof md !== "object") && (crypto2.pbkdf2Sync.length > 4 || (!md || md === "sha1"))) { if (typeof md !== "string") { md = "sha1"; } p = Buffer.from(p, "binary"); s = Buffer.from(s, "binary"); if (!callback) { - if (crypto.pbkdf2Sync.length === 4) { - return crypto.pbkdf2Sync(p, s, c, dkLen).toString("binary"); + if (crypto2.pbkdf2Sync.length === 4) { + return crypto2.pbkdf2Sync(p, s, c, dkLen).toString("binary"); } - return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString("binary"); + return crypto2.pbkdf2Sync(p, s, c, dkLen, md).toString("binary"); } - if (crypto.pbkdf2Sync.length === 4) { - return crypto.pbkdf2(p, s, c, dkLen, function(err2, key) { + if (crypto2.pbkdf2Sync.length === 4) { + return crypto2.pbkdf2(p, s, c, dkLen, function(err2, key) { if (err2) { return callback(err2); } callback(null, key.toString("binary")); }); } - return crypto.pbkdf2(p, s, c, dkLen, md, function(err2, key) { + return crypto2.pbkdf2(p, s, c, dkLen, md, function(err2, key) { if (err2) { return callback(err2); } @@ -28966,15 +30805,15 @@ var require_rc2 = __commonJS({ var runPlan = function(plan) { var R = []; for (i = 0; i < 4; i++) { - var val2 = _input.getInt16Le(); + var val = _input.getInt16Le(); if (_iv !== null) { if (encrypt) { - val2 ^= _iv.getInt16Le(); + val ^= _iv.getInt16Le(); } else { - _iv.putInt16Le(val2); + _iv.putInt16Le(val); } } - R.push(val2 & 65535); + R.push(val & 65535); } j = encrypt ? 0 : 63; for (var ptr = 0; ptr < plan.length; ptr++) { @@ -41385,8 +43224,8 @@ var require_ssh = __commonJS({ } return digest; }; - function _addBigIntegerToBuffer(buffer, val2) { - var hexVal = val2.toString(16); + function _addBigIntegerToBuffer(buffer, val) { + var hexVal = val.toString(16); if (hexVal[0] >= "8") { hexVal = "00" + hexVal; } @@ -41394,9 +43233,9 @@ var require_ssh = __commonJS({ buffer.putInt32(bytes.length); buffer.putBytes(bytes); } - function _addStringToBuffer(buffer, val2) { - buffer.putInt32(val2.length); - buffer.putString(val2); + function _addStringToBuffer(buffer, val) { + buffer.putInt32(val.length); + buffer.putString(val); } function _sha1() { var sha = forge.md.sha1.create(); @@ -41586,7 +43425,7 @@ var require_proxy3 = __commonJS({ var require_lib4 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -41599,21 +43438,21 @@ var require_lib4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -41642,10 +43481,10 @@ var require_lib4 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -41720,8 +43559,8 @@ var require_lib4 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -41733,8 +43572,8 @@ var require_lib4 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -41791,42 +43630,42 @@ var require_lib4 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -41835,14 +43674,14 @@ var require_lib4 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -41851,7 +43690,7 @@ var require_lib4 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -41860,7 +43699,7 @@ var require_lib4 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -41874,7 +43713,7 @@ var require_lib4 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -41948,7 +43787,7 @@ var require_lib4 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -42135,15 +43974,15 @@ var require_lib4 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -42202,10 +44041,10 @@ var require_lib4 = __commonJS({ }); // node_modules/@actions/github/lib/internal/utils.js -var require_utils3 = __commonJS({ +var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -42218,21 +44057,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -42261,7 +44100,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib4()); + var httpClient = __importStar2(require_lib4()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -42284,7 +44123,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -46756,10 +48595,10 @@ var require_dist_node13 = __commonJS({ }); // node_modules/@actions/github/lib/utils.js -var require_utils4 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -46772,24 +48611,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils4()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -46819,7 +48658,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -46832,24 +48671,24 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); - var utils_1 = require_utils4(); + var Context = __importStar2(require_context()); + var utils_1 = require_utils5(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); @@ -46859,464 +48698,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which4; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which4(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which4(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -47346,12 +48727,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -49260,8 +50641,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -50243,11 +51624,1440 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils6 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils6(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils6(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib6(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -50256,28 +53066,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which4(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which4(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which4; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io4 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner3 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io4.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner3; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils6(); + var os2 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable4(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable4; + function setSecret2(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret2; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug5(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug5; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning7(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning7; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState3(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState3; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core12 = __importStar4(require_core()); + var core12 = __importStar2(require_core3()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -50288,10 +54464,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core12.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core12.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core12.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core12.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -50299,40 +54483,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); @@ -50347,15 +54535,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -50370,11 +54558,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path2.sep; @@ -50383,7 +54571,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -50392,7 +54580,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -50430,9 +54618,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -50442,40 +54630,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -51319,41 +55511,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -51363,7 +55559,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path2.sep); @@ -51379,17 +55575,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -51416,42 +55612,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os2 = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os2 = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -51464,9 +55664,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -51533,17 +55733,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { homedir = homedir || os2.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -51617,9 +55817,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -51633,34 +55833,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -51687,7 +55891,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -51706,10 +55910,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -51730,7 +55934,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -51744,11 +55948,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core12 = __importStar4(require_core()); - var fs = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core12 = __importStar2(require_core3()); + var fs = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path2 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -51763,19 +55967,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -51784,7 +55990,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -51797,7 +56003,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core12.debug(`Search path '${searchPath}'`); try { - yield __await4(fs.promises.lstat(searchPath)); + yield __await2(fs.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -51814,24 +56020,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -51840,7 +56049,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -51859,7 +56068,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -51896,11 +56105,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core12 = __importStar2(require_core3()); + var fs = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path2 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core12.info : core12.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -51928,435 +56277,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which4(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which4(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which4; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -53553,7 +57493,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -53566,21 +57506,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -53607,7 +57557,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -53627,20 +57577,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core12 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io4 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - var semver5 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core12 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io4 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + var semver5 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -53656,27 +57615,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path2.join(baseLocation, "actions", "temp"); } - const dest = path2.join(tempDirectory, crypto.randomUUID()); + const dest = path2.join(tempDirectory, crypto2.randomUUID()); yield io4.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -53700,15 +57657,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core12.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -53730,7 +57685,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver5.clean(versionOutput); core12.debug(`zstd version: ${version}`); @@ -53741,13 +57696,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -53755,14 +57708,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io4.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -53772,9 +57723,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -53782,1772 +57732,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os2 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os2.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug6, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug6(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug5 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug5("azure"); - AzureLogger.log = (...args) => { - debug5.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug5.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug5.disable(); - debug5.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve2, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve2(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random2(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { - token = setTimeout(resolve2, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha2562 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random2(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha2562(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log2(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -55575,6 +57763,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -55899,7 +58088,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -55975,9 +58164,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path2, preserveJsx) { + if (typeof path2 === "string" && /^\.\.?\//.test(path2)) { + return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path2; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -55987,7 +58184,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -56014,6 +58211,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -56024,6 +58229,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -56045,400 +58254,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os2 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -56452,295 +58276,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve2, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log2(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve2(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug5, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug5(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -56753,6 +58579,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -56776,8 +58603,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -56828,21 +58654,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log3(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve2) => { + const handler = () => { + resolve2(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve2, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve2) : node_https_1.default.request(options, resolve2); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve2, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve2(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random2(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve2, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve2(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -56851,7 +60072,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -56886,7 +60107,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -56895,7 +60116,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -56925,16 +60146,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -57087,8 +60308,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -57193,11 +60414,11 @@ var require_common = __commonJS({ } return false; } - function coerce2(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce2(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -57601,17 +60822,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -57683,7 +60904,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -57696,24 +60917,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -57750,10 +60971,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -57766,29 +60987,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -57909,12 +61130,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve2, reject) => { @@ -58002,10 +61223,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -58018,30 +61239,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug5 = (0, debug_1.default)("https-proxy-agent"); @@ -58152,10 +61373,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -58168,30 +61389,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug5 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -58281,18 +61502,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log2(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log3(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -58323,7 +61544,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -58342,7 +61563,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -58377,7 +61598,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -58420,8 +61641,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -58433,6 +61653,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log3(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning7 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning7); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning7); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path2, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path2, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log4 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log4(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha2562 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random2(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha2562(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve2, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve2(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { + token = setTimeout(resolve2, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -58455,24 +63685,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -58482,7 +63720,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -58497,8 +63736,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -58537,7 +63776,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -58550,10 +63792,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -58573,18 +63816,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -58593,14 +63833,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -58608,7 +63852,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -58645,12 +63889,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -58666,54 +63909,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -58725,24 +63931,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log2(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log4(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -58756,7 +63961,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -58824,9 +64029,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -58835,41 +64042,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -58881,425 +64153,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log2(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve2) => { - const handler = () => { - resolve2(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve2, reject) => { - const req = isInsecure ? http.request(options, resolve2) : https.request(options, resolve2); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve2, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve2(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -59311,7 +64275,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -59325,7 +64289,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -59338,7 +64302,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -59347,7 +64311,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -59360,14 +64327,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -59378,14 +64344,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -59426,32 +64391,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -59483,22 +64472,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -59509,6 +64537,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -59545,17 +64597,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -59599,46 +64650,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -59652,21 +64703,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -59676,28 +64727,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -59708,25 +64759,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -59754,6 +64805,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -59764,509 +64822,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -60274,6 +64829,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -60314,7 +64870,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -60328,8 +64884,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -60387,8 +64945,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -60434,7 +64993,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -60443,7 +65010,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -60482,7 +65049,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -60493,514 +65062,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -61009,24 +65073,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -61042,52 +65105,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -61104,7 +65179,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -61113,12 +65187,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils7(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -61184,12 +65261,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -61253,14 +65329,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -61323,7 +65398,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -61477,7 +65551,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -61486,7 +65559,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -61494,7 +65567,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -61532,7 +65605,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -61550,7 +65623,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -61591,7 +65664,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -61637,7 +65713,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -61651,8 +65727,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -61691,7 +65766,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -61774,7 +65849,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -61784,7 +65858,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -61812,7 +65886,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -61821,7 +65894,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -61876,7 +65949,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -61922,7 +65996,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -61955,7 +66028,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -61964,25 +66036,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -61993,17 +66065,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -62011,7 +66082,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -62028,7 +66099,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -62069,7 +66140,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -62081,18 +66151,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -62126,8 +66196,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -62165,7 +66234,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -62177,7 +66247,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -62190,7 +66259,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -62199,7 +66267,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -62211,8 +66282,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -62221,9 +66292,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -62240,24 +66309,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -62282,7 +66349,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -62302,7 +66369,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -62327,16 +66393,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -62349,7 +66415,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -62358,8 +66423,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -62367,16 +66432,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -62406,7 +66471,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -62415,9 +66479,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -62460,10 +66523,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -62572,17 +66634,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log3 = __commonJS({ +var require_log5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -62593,31 +66654,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils7(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log3(); + var log_js_1 = require_log5(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -62691,16 +66772,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -62712,7 +66793,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -62737,18 +66821,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log3(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log5(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -62769,10 +66853,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -62807,11 +66890,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -62849,7 +66935,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -62864,7 +66950,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -62880,7 +66966,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -62921,8 +67007,11 @@ var require_util9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -62947,7 +67036,9 @@ var require_util9 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -62955,10 +67046,8 @@ var require_util9 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -62974,6 +67063,8 @@ var require_util9 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -62983,7 +67074,7 @@ var require_util9 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -63014,7 +67105,9 @@ var require_util9 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -63026,15 +67119,14 @@ var require_util9 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -63163,14 +67255,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util9(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -63192,13 +67285,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -63207,10 +67300,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -63221,17 +67317,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -63245,8 +67340,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -63254,7 +67348,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -63273,7 +67370,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util9(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -63311,7 +67409,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -63320,7 +67417,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util9(); function convertHttpClient(requestPolicyClient) { @@ -63331,12 +67428,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -63370,1680 +67466,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util10 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util10(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util10(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util10(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -65081,7 +68334,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -65115,7 +68368,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -65137,6 +68390,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -65154,7 +68418,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -65166,1193 +68430,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve2, reject) => { - this.resolve = resolve2; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -66378,17 +68464,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -66397,14 +68493,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -66430,16 +68526,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -66537,7 +68633,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -66572,9 +68668,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -66596,8 +68692,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 || "/"; path2 = escape2(path2); @@ -66629,7 +68772,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -66684,15 +68827,15 @@ var require_dist7 = __commonJS({ function escape2(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(url, name) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; urlParsed.pathname = path2; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -66711,34 +68854,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -66750,8 +68892,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -66772,8 +68914,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -66788,7 +68930,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -66836,11 +68981,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -66857,31 +69022,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -66890,12 +69055,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -66976,6 +69141,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -66987,25 +69156,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -67061,22 +69244,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -67084,15 +69303,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -67117,21 +69336,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -67149,10 +69368,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -67165,9 +69384,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -67175,16 +69394,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -67200,21 +69432,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -67229,10 +69480,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -67251,6 +69513,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -67674,7 +69946,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -67691,31 +69980,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -67725,7 +70014,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -67745,10 +70034,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -67769,10 +70058,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -67792,6 +70081,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential2 = class { /** * Creates a RequestPolicy object. @@ -67803,7 +70102,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential2 { + exports2.Credential = Credential2; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -67821,7 +70141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -67829,10 +70149,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -67844,7 +70175,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential2 { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -67852,44 +70195,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve2, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve2).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve2(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 || "/"; + path2 = escape2(path2); + urlParsed.pathname = path2; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape2(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; + urlParsed.pathname = path2; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve2, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve2(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential2 = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential2; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log7 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log7(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log7(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -67905,71 +72258,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -67981,61 +72345,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -68043,12 +72421,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -68064,10 +72442,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -68087,14 +72465,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -68111,17 +72849,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -68130,24 +72882,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log6(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -68156,6 +72952,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -68179,9 +72983,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -68204,7 +73009,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -68212,75 +73017,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -68289,28 +73105,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -68353,7 +73169,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -68425,7 +73394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -68474,7 +73443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -68501,7 +73470,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -68540,7 +73509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -68592,7 +73561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -68630,7 +73599,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -68643,6 +73612,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -68660,7 +73650,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -68678,7 +73668,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -68704,7 +73694,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -68767,7 +73757,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -68815,7 +73805,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -68927,7 +73917,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -68952,7 +73942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -69017,7 +74007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -69067,7 +74057,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -69101,7 +74091,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -69127,7 +74117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -69153,7 +74143,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -69179,7 +74169,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -69209,7 +74199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -69273,7 +74263,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -69298,7 +74288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -69385,7 +74375,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -69410,7 +74400,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -69737,7 +74727,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -69808,7 +74798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -69847,7 +74837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -69864,7 +74854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -69913,7 +74903,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -69952,7 +74942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -69977,7 +74967,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -70021,7 +75011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -70047,7 +75037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -70073,7 +75063,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -70115,7 +75105,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -70132,7 +75122,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -70182,7 +75172,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -70227,7 +75217,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -70244,7 +75234,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -70270,7 +75260,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -70309,7 +75299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -70346,7 +75336,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -70362,7 +75352,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -70399,7 +75389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -70415,7 +75405,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -70459,7 +75449,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -70475,7 +75465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -70512,7 +75502,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -70528,7 +75518,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -70572,7 +75562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -70588,7 +75578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -70667,7 +75657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -70683,7 +75673,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -70727,7 +75717,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -70743,7 +75733,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -70787,7 +75777,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -70803,7 +75793,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -70861,7 +75851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -70877,7 +75867,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -71017,7 +76007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -71033,7 +76023,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -71077,7 +76067,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -71093,7 +76083,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -71151,7 +76141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -71167,7 +76157,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -71233,7 +76223,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -71249,7 +76239,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -71307,7 +76297,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -71323,7 +76313,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -71367,7 +76357,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -71383,7 +76373,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -71427,7 +76417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -71443,7 +76433,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -71473,7 +76463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -71489,7 +76479,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -71526,7 +76516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -71542,7 +76532,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -71600,7 +76590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -71616,7 +76606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -71667,7 +76657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -71683,7 +76673,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -71741,7 +76731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -71757,7 +76747,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -71815,7 +76805,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -71831,7 +76821,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -71889,7 +76879,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -71905,7 +76895,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -71956,7 +76946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -71972,7 +76962,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -72023,7 +77013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -72039,7 +77029,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -72111,7 +77101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -72127,7 +77117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -72467,7 +77457,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -72483,7 +77473,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -72859,7 +77849,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -72875,7 +77865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -72919,7 +77909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -72935,7 +77925,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -72979,7 +77969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -72995,7 +77985,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -73046,7 +78036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -73062,7 +78052,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -73127,7 +78117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -73143,7 +78133,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -73195,7 +78185,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -73211,7 +78201,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -73248,7 +78238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -73264,7 +78254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -73308,7 +78298,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -73324,7 +78314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -73410,7 +78400,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -73426,7 +78416,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -73484,7 +78474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -73500,7 +78490,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -73551,7 +78541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -73567,7 +78557,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -73625,7 +78615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -73641,7 +78631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -73699,7 +78689,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -73715,7 +78705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -73773,7 +78763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -73789,7 +78779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -73868,7 +78858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -73884,7 +78874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -73964,7 +78954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -73976,11 +78966,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -74081,7 +79085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -74093,11 +79097,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -74141,7 +79159,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -74157,7 +79175,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -74194,7 +79212,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -74210,7 +79228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -74282,7 +79300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -74298,7 +79316,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -74558,7 +79576,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -74574,7 +79592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -74618,7 +79636,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -74634,7 +79652,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -74678,7 +79696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -74694,7 +79712,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -74787,7 +79805,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -74803,7 +79821,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -74903,7 +79921,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -74919,7 +79937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -74998,7 +80016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -75014,7 +80032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -75107,7 +80125,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -75119,11 +80137,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -75188,7 +80220,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -75204,7 +80236,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -75269,7 +80301,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -75285,7 +80317,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -75350,7 +80382,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -75366,7 +80398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -75431,7 +80463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -75447,7 +80479,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -75520,7 +80552,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -75536,7 +80568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -75629,7 +80661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -75645,7 +80677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -75752,7 +80784,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -75768,7 +80800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -75868,7 +80900,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -75880,11 +80912,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -75942,7 +80988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -75958,7 +81004,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -76051,7 +81097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -76067,7 +81113,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -76160,7 +81206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -76172,11 +81218,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -76255,7 +81315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -76271,7 +81331,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -76350,7 +81410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -76362,11 +81422,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -76466,7 +81540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -76482,7 +81556,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -76554,7 +81628,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -76570,189 +81644,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -76763,11 +81667,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -76778,7 +81682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -76790,7 +81694,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -76801,7 +81705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -76812,7 +81716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -76825,10 +81729,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -76836,7 +81740,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -76846,7 +81750,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -76857,7 +81761,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -76868,7 +81772,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -76879,7 +81783,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -76889,7 +81793,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -76899,7 +81803,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -76912,7 +81816,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -76930,11 +81834,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -76945,7 +81849,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -76956,7 +81860,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -76967,7 +81871,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -76978,7 +81882,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -76989,7 +81893,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -77000,7 +81904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -77011,7 +81915,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -77021,7 +81925,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -77032,7 +81936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -77044,7 +81948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -77055,7 +81959,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -77069,7 +81973,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -77083,7 +81987,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -77093,7 +81997,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -77103,7 +82007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -77113,7 +82017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -77124,7 +82028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -77135,7 +82039,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -77153,7 +82057,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -77164,7 +82068,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -77174,7 +82078,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -77184,7 +82088,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -77195,7 +82099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -77206,7 +82110,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -77216,7 +82120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -77227,7 +82131,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -77238,7 +82142,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -77248,7 +82152,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -77258,7 +82162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -77269,7 +82173,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -77280,7 +82184,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -77291,7 +82195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -77302,7 +82206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -77312,7 +82216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -77323,7 +82227,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -77334,7 +82238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -77363,7 +82267,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -77374,7 +82278,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -77384,7 +82288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -77394,7 +82298,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -77404,7 +82308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -77414,7 +82318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -77424,7 +82328,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -77434,7 +82338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -77444,7 +82348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -77454,7 +82358,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -77464,7 +82368,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -77474,7 +82378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -77484,7 +82388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -77495,7 +82399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -77505,7 +82409,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -77516,7 +82420,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -77527,7 +82431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -77537,7 +82441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -77547,7 +82451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -77557,7 +82461,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -77567,7 +82471,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -77577,7 +82481,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -77587,7 +82491,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -77597,7 +82501,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -77608,7 +82512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -77618,7 +82522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -77629,7 +82533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -77640,7 +82544,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -77651,7 +82555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -77661,7 +82565,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -77672,7 +82576,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -77699,7 +82603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -77710,7 +82614,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -77724,7 +82628,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -77738,7 +82642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -77748,7 +82652,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -77762,7 +82666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -77772,7 +82676,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -77783,7 +82687,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -77793,7 +82697,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -77803,7 +82707,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -77813,7 +82717,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -77824,7 +82728,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -77834,7 +82738,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -77844,7 +82748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -77855,7 +82759,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -77866,7 +82780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -77877,7 +82791,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -77888,7 +82802,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -77899,7 +82813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -77927,11 +82841,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -77942,7 +82856,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -77953,11 +82867,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -77967,7 +82881,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -77977,7 +82891,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -77988,7 +82902,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -77999,7 +82913,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -78010,7 +82924,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -78021,7 +82935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -78032,7 +82946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -78043,7 +82957,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -78054,7 +82968,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -78065,7 +82979,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -78079,7 +82993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -78093,7 +83007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -78107,7 +83021,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -78118,7 +83032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -78129,7 +83043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -78140,7 +83054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -78150,7 +83064,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -78161,7 +83075,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -78172,7 +83086,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -78182,7 +83096,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -78192,7 +83106,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -78204,7 +83118,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -78215,7 +83129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -78226,7 +83140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -78237,7 +83151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -78247,7 +83161,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -78261,7 +83175,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -78271,7 +83185,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -78282,7 +83196,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -78293,7 +83207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -78303,7 +83217,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -78314,7 +83228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -78325,11 +83239,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -78340,7 +83254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -78353,7 +83267,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -78367,8 +83295,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -78376,7 +83304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -78400,15 +83328,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -78418,8 +83346,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -78428,10 +83356,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -78441,173 +83370,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -78616,58 +83545,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -78681,7 +83624,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -78689,7 +83632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -78697,14 +83640,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -78734,8 +83677,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -78745,8 +83688,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -78762,7 +83705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -78770,8 +83713,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -78779,8 +83722,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -78788,7 +83731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -78799,8 +83742,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -78817,124 +83760,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -78953,117 +83897,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -79074,304 +84018,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -79425,8 +84383,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -79454,8 +84412,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -79479,8 +84437,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -79488,8 +84446,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -79500,8 +84458,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -79526,8 +84484,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -79538,8 +84496,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -79548,8 +84506,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -79560,8 +84518,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -79593,7 +84551,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -79607,651 +84566,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -80262,112 +85237,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -80382,8 +85371,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -80391,16 +85380,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -80413,8 +85402,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -80438,8 +85427,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -80448,8 +85437,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -80463,358 +85452,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -80827,8 +85832,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -80838,8 +85843,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -80850,8 +85855,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -80862,7 +85867,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -80872,161 +85878,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -81043,8 +86064,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -81059,8 +86080,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -81071,8 +86092,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -81084,8 +86105,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -81098,8 +86119,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -81108,11 +86129,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -81122,47 +86144,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -81174,51 +86196,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -81228,33 +86251,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -81266,38 +86289,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -81307,45 +86331,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -81357,41 +86381,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -81400,67 +86452,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -81553,6 +86750,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -81597,22 +86838,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -81717,12 +86953,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -81769,7 +87057,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -81786,18 +87097,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -81812,8 +87261,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -81844,19 +87293,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -81923,13 +87372,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -81944,10 +87393,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -82007,38 +87456,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -82059,18 +87531,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -82081,7 +87553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -82104,18 +87576,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -82128,7 +87600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -82151,18 +87623,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -82176,7 +87648,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -82199,23 +87671,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -82228,7 +87700,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -82251,27 +87723,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -82284,7 +87756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -82307,27 +87779,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -82341,7 +87813,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -82353,47 +87886,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -82415,7 +87965,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -82425,34 +87975,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -82460,73 +88011,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -82534,32 +88088,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -82572,52 +88148,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -82643,12 +88173,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -83075,7 +88662,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -83083,6 +88670,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -83094,13 +88683,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -83109,8 +88717,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -83122,19 +88730,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -83143,7 +88751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -83155,17 +88763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -83174,59 +88782,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -83283,7 +88892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -83323,87 +88932,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -83417,13 +89042,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -83433,31 +89083,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -83469,49 +89119,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -83524,8 +89197,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -83579,7 +89251,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -83588,11 +89299,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -83680,6 +89390,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -84017,7 +89739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -84025,6 +89747,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -84033,52 +89757,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -84088,27 +89835,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve2, reject) => { + this.resolve = resolve2; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -84116,20 +91037,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -84137,10 +91059,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -84180,12 +91102,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -84195,27 +91126,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -84285,333 +91250,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve2, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve2).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve2(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils8 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve2, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve2(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -84619,28 +91287,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve2(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve2, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -84651,18 +91319,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve2(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve2, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve2, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -84673,9 +91353,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils8(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -84691,49 +91410,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -84742,8 +91461,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -84752,8 +91471,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -84783,7 +91502,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -84792,76 +91511,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -84869,8 +91618,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -84878,9 +91626,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -84889,7 +91637,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -84906,9 +91657,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -84919,7 +91670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -84929,7 +91680,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -84940,17 +91691,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -84958,19 +91717,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -84980,19 +91741,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -85002,13 +91771,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -85019,7 +91788,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -85031,14 +91800,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -85049,22 +91820,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -85080,15 +91853,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -85098,15 +91873,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -85117,24 +91899,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -85155,57 +91939,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -85213,15 +91998,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -85233,14 +92018,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -85250,36 +92035,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -85290,31 +92078,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -85322,12 +92111,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -85338,26 +92127,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -85371,8 +92163,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -85380,7 +92172,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -85400,10 +92192,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -85418,7 +92213,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -85446,21 +92241,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -85468,12 +92265,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -85485,18 +92282,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -85505,17 +92308,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -85523,8 +92376,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -85535,8 +92388,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -85549,8 +92402,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -85560,60 +92413,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -85624,40 +92482,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -85665,20 +92538,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -85691,20 +92575,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -85713,29 +92599,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -85750,7 +92651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -85764,74 +92665,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -85843,8 +92759,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -85853,15 +92769,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -85877,26 +92810,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -85914,7 +92849,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -85925,32 +92860,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -85975,22 +92926,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -85998,10 +92964,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -86019,7 +92985,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -86036,18 +93002,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -86058,30 +93025,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -86089,20 +93058,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -86131,18 +93102,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -86169,7 +93140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -86190,23 +93161,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -86216,32 +93186,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -86267,15 +93237,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -86294,27 +93267,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -86332,50 +93305,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -86386,13 +93367,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -86400,23 +93381,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -86425,21 +93408,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -86447,7 +93442,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -86455,19 +93450,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -86480,7 +93477,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -86491,32 +93488,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -86525,13 +93525,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -86541,7 +93543,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -86550,16 +93552,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -86567,22 +93571,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -86602,17 +93608,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -86621,94 +93625,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -86734,13 +93723,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -86750,17 +93742,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -86769,7 +93763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -86777,20 +93771,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -86811,17 +93807,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -86831,94 +93825,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -86927,7 +93915,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -86945,13 +93935,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -86959,24 +93952,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -86984,12 +93979,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -86997,22 +93994,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -87022,38 +94021,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils8(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log6(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -87064,15 +94097,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -87084,18 +94117,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -87115,7 +94148,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -87130,7 +94163,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -87145,6 +94178,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -87184,6 +94227,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve2(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -87200,11 +94245,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -87228,13 +94298,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -87246,13 +94316,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -87261,28 +94331,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -87290,24 +94360,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -87320,9 +94398,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -87331,19 +94409,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -87352,23 +94430,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path2 = getURLPath(subRequest.url); + const path2 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path2 || path2 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -87379,7 +94457,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -87396,7 +94474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -87407,7 +94485,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -87418,18 +94496,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path2 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path2 = (0, utils_common_js_1.getURLPath)(url); if (path2 && path2 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -87441,10 +94537,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -87455,7 +94551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -87473,11 +94569,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -87485,17 +94595,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -87504,10 +94629,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -87524,7 +94651,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -87533,48 +94688,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -87582,34 +94737,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -87626,7 +94799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -87648,7 +94821,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -87656,7 +94829,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -87666,15 +94839,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -87682,12 +94867,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -87700,14 +94885,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -87715,8 +94904,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -87727,19 +94916,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -87751,24 +94947,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -87781,7 +94977,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -87789,8 +94985,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -87839,29 +95035,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -87876,7 +95072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -87890,7 +95086,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -87900,10 +95096,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -87915,14 +95111,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -87935,18 +95131,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -87955,23 +95171,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -87987,44 +95226,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -88032,64 +95253,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -88097,41 +95317,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -88150,7 +95373,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -88167,17 +95393,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -88185,35 +95409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -88221,118 +95432,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -88350,7 +95581,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -88371,23 +95605,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -88407,18 +95645,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -88429,27 +95665,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -88459,53 +95679,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -88513,11 +95734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -88529,7 +95749,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -88548,7 +95770,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -88557,14 +95782,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -88576,7 +95801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -88596,18 +95821,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -88616,45 +95844,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -88758,6 +96019,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -88765,7 +96078,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -88812,12 +96125,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -88843,10 +96161,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -88863,13 +96193,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -88898,6 +96232,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -88919,44 +96269,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -88967,22 +96335,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -88997,35 +96393,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -89036,22 +96432,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -89068,7 +96473,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -89082,47 +96487,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -89131,15 +96518,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -89149,14 +96536,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -89167,14 +96554,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -89182,7 +96569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -89194,9 +96581,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -89217,23 +96610,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -89253,18 +96650,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -89275,27 +96670,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -89303,57 +96682,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -89365,7 +96740,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -89377,7 +96752,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -89396,7 +96773,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -89412,45 +96792,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -89458,45 +96820,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -89518,7 +96876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -89530,17 +96888,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -89559,7 +96920,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -89569,16 +96933,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -89592,19 +96956,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -89612,7 +96984,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -89620,21 +96992,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -89642,7 +97015,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -89650,66 +97023,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential2; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log6(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -89794,7 +97225,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -89807,21 +97238,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -89849,9 +97290,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core12 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core12 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -89934,15 +97376,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -89961,7 +97405,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -89969,7 +97412,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -89982,21 +97425,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -90024,9 +97477,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib6(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -90034,14 +97492,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -90053,14 +97509,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -90097,9 +97552,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -90123,13 +97577,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -90137,7 +97733,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -90150,21 +97746,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -90192,20 +97798,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib6(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -90307,10 +97916,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -90330,17 +97939,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -90357,7 +97965,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -90370,7 +97978,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -90394,9 +98002,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -90417,8 +98024,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -90434,8 +98041,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -90479,8 +98086,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve2) => { timeoutHandle = setTimeout(() => resolve2("timeout"), timeoutMs); @@ -90497,7 +98103,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -90510,23 +98116,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core12 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core12 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -90551,7 +98168,6 @@ var require_options = __commonJS({ core12.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -90593,7 +98209,6 @@ var require_options = __commonJS({ core12.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -90602,7 +98217,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -90611,13 +98228,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -90629,7 +98244,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -90638,7 +98252,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -90675,22 +98289,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -90701,12 +98319,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -90714,7 +98331,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -90727,21 +98344,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -90769,13 +98396,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib6(); - var auth_1 = require_auth2(); - var fs = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -90808,11 +98438,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -90835,11 +98465,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -90856,7 +98485,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -90872,9 +98501,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -90882,24 +98510,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core12.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -90908,7 +98535,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs.openSync(archivePath, "r"); @@ -90919,7 +98546,7 @@ Other caches with similar key:`); core12.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -90942,15 +98569,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -90972,7 +98599,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -92567,26 +100193,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -92595,22 +100221,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -92624,10 +100250,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -92832,26 +100458,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -92863,26 +100489,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -93132,7 +100758,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -93145,13 +100771,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -93163,19 +100789,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -93280,8 +100906,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -93851,18 +101477,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -94053,7 +101679,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -94162,7 +101788,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -94170,7 +101796,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -94184,7 +101810,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -94276,9 +101902,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -94299,7 +101925,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -94448,7 +102074,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -94495,7 +102121,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -94517,7 +102143,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -94566,7 +102192,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -94587,7 +102213,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -94635,7 +102261,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -94656,7 +102282,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -94704,7 +102330,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -94724,7 +102350,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -94754,7 +102380,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -94828,7 +102454,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -94998,7 +102624,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -95122,7 +102748,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -95208,11 +102834,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -95284,11 +102910,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -95350,17 +102976,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -95835,7 +103461,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -95903,11 +103529,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util11 = __commonJS({ +var require_util10 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -95923,7 +103550,6 @@ var require_util11 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -95936,7 +103562,6 @@ var require_util11 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -95944,7 +103569,7 @@ var require_util11 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -95972,16 +103597,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib6(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util11(); + var util_1 = require_util10(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -96005,14 +103630,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -96022,7 +103647,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -96093,7 +103718,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } @@ -96113,7 +103738,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -96121,7 +103745,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -96134,21 +103758,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -96176,16 +103810,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io4 = __importStar4(require_io4()); + var io4 = __importStar2(require_io()); var fs_1 = require("fs"); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -96217,8 +103853,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -96248,8 +103884,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -96271,7 +103907,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -96295,7 +103931,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -96320,7 +103956,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -96334,37 +103970,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io4.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -96377,21 +104010,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -96419,15 +104062,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core12 = __importStar4(require_core()); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core12 = __importStar2(require_core()); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib6(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -96476,9 +104122,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -96491,9 +104136,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core12.debug("Resolved Keys:"); @@ -96550,8 +104194,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -96622,8 +104266,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -96637,10 +104281,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -96701,8 +104344,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -96799,12 +104442,12 @@ var import_node_forge = __toESM(require_lib3()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io3()); +var io2 = __toESM(require_io()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var core3 = __toESM(require_core()); -var io = __toESM(require_io3()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -99608,7 +107251,7 @@ var persistInputs = function() { // src/api-client.ts var core5 = __toESM(require_core()); -var githubUtils = __toESM(require_utils4()); +var githubUtils = __toESM(require_utils5()); var retry = __toESM(require_dist_node15()); // src/repository.ts @@ -99909,12 +107552,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { var semver4 = __toESM(require_semver2()); // src/overlay-database-utils.ts -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core9 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io3()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -100212,7 +107855,7 @@ var featureConfig = { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 1d866be1e..47f732b5d 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os2 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os2.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs12 = __importStar4(require("fs")); - var os2 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs12 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); + supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve6({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path11 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path11 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path11.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs12 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs12 = __importStar2(require("fs")); + var path11 = __importStar2(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs12.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs12.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path11.dirname(filePath); const upperName = path11.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path11.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path11 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path11 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os2 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path11 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path11 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path11.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable5; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed; + exports2.isDebug = isDebug2; + exports2.debug = debug4; + exports2.error = error3; + exports2.warning = warning9; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); + var os2 = __importStar2(require("os")); + var path11 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable5(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable5; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path11.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug4(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug4; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning9(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning9; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os2.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -20130,8 +20302,8 @@ var require_helpers = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -21258,7 +21430,7 @@ var require_proxy2 = __commonJS({ var require_lib3 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21271,21 +21443,21 @@ var require_lib3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -21314,10 +21486,10 @@ var require_lib3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -21392,8 +21564,8 @@ var require_lib3 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -21405,8 +21577,8 @@ var require_lib3 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -21463,42 +21635,42 @@ var require_lib3 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -21507,14 +21679,14 @@ var require_lib3 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -21523,7 +21695,7 @@ var require_lib3 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -21532,7 +21704,7 @@ var require_lib3 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -21546,7 +21718,7 @@ var require_lib3 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -21620,7 +21792,7 @@ var require_lib3 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -21807,15 +21979,15 @@ var require_lib3 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -21877,7 +22049,7 @@ var require_lib3 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -21890,21 +22062,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -21933,7 +22105,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib3()); + var httpClient = __importStar2(require_lib3()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -21956,7 +22128,7 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -26431,7 +26603,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -26444,24 +26616,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -26491,7 +26663,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -26504,23 +26676,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -26531,464 +26703,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs12 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs12.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs12.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path11.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path11.dirname(filePath); - const upperName = path11.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path11.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path11 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path11.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path11.join(dest, path11.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path11.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path11.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path11.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -28948,12 +28662,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -30548,11 +30262,1440 @@ var require_dist_node15 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs12 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs12.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs12.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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(url2, base) { + super(url2, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve6(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve6(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve6(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve6(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve6(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path11 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path11.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -30561,28 +31704,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs12 = __importStar2(require("fs")); + var path11 = __importStar2(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs12.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path11.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path11.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path11 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path11.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path11.join(dest, path11.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path11.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path11.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path11.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path11 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path11.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve6(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os2 = __importStar2(require("os")); + var path11 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path11.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core12 = __importStar4(require_core()); + var core12 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -30593,10 +33102,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core12.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core12.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core12.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core12.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -30604,40 +33121,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path11 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path11 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { p = safeTrimTrailingSeparator(p); @@ -30652,15 +33173,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -30675,11 +33196,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path11.sep; @@ -30688,7 +33209,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -30697,7 +33218,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -30735,9 +33256,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -30747,40 +33268,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -31624,41 +34149,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path11 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path11 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -31668,7 +34197,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path11.sep); @@ -31684,17 +34213,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -31721,42 +34250,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os2 = __importStar2(require("os")); + var path11 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -31769,9 +34302,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -31838,17 +34371,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path11.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path11.sep}`)) { homedir = homedir || os2.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -31922,9 +34455,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -31938,34 +34471,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -31992,7 +34529,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32011,10 +34548,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32035,7 +34572,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -32049,11 +34586,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core12 = __importStar4(require_core()); - var fs12 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path11 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core12 = __importStar2(require_core2()); + var fs12 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path11 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -32068,19 +34605,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -32089,7 +34628,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -32102,7 +34641,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core12.debug(`Search path '${searchPath}'`); try { - yield __await4(fs12.promises.lstat(searchPath)); + yield __await2(fs12.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -32119,24 +34658,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path11.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -32145,7 +34687,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -32164,7 +34706,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -32201,11 +34743,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); + }); + }; + } + function settle(resolve6, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve6({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core12 = __importStar2(require_core2()); + var fs12 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path11 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core12.info : core12.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path11.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs12.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash2 = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs12.createReadStream(file), hash2); + result.write(hash2.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -32233,435 +34915,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs12 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs12.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path11.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path11.dirname(filePath); - const upperName = path11.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path11.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path11 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path11.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path11.join(dest, path11.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path11.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path11.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path11.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -33858,7 +36131,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -33871,21 +36144,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -33912,7 +36195,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -33932,20 +36215,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core12 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs12 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core12 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs12 = __importStar2(require("fs")); + var path11 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -33961,27 +36253,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path11.join(baseLocation, "actions", "temp"); } - const dest = path11.join(tempDirectory, crypto.randomUUID()); + const dest = path11.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs12.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -34005,15 +36295,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs12.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core12.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -34035,7 +36323,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core12.debug(`zstd version: ${version}`); @@ -34046,13 +36334,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs12.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -34060,14 +36346,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -34077,9 +36361,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -34087,1772 +36370,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve6(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve6(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve6(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve6(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve6(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os2 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os2.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug5, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug5(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug4 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug4("azure"); - AzureLogger.log = (...args) => { - debug4.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug4.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug4.disable(); - debug4.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve6, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve6(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { - token = setTimeout(resolve6, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url2 = new URL(value); - if (!url2.search) { - return value; - } - for (const [key] of url2.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url2.searchParams.set(key, RedactedString); - } - } - return url2.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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 url2 = new URL(locationHeader, request.url); - request.url = url2.toString(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -35880,6 +36401,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -36204,7 +36726,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -36280,9 +36802,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path11, preserveJsx) { + if (typeof path11 === "string" && /^\.\.?\//.test(path11)) { + return path11.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path11; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -36292,7 +36822,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -36319,6 +36849,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -36329,6 +36867,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -36350,400 +36892,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os2 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os2.arch()}-${os2.type()}-${os2.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -36757,295 +36914,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve6, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve6(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug4, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers2(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug4(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers2(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -37058,6 +37217,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -37081,8 +37241,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -37133,21 +37292,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url2 = new URL(value); + if (!url2.search) { + return value; + } + for (const [key] of url2.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url2.searchParams.set(key, RedactedString); + } + } + return url2.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve6) => { + const handler = () => { + resolve6(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + 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 = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve6, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve6) : node_https_1.default.request(options, resolve6); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve6, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve6(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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 url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve6, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve6(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers2(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers2(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -37156,7 +38710,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -37191,7 +38745,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -37200,7 +38754,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -37230,16 +38784,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -37392,8 +38946,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -37498,11 +39052,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -37906,17 +39460,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -37988,7 +39542,7 @@ var require_src = __commonJS({ var require_helpers3 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38001,24 +39555,24 @@ var require_helpers3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -38055,10 +39609,10 @@ var require_helpers3 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38071,29 +39625,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers3(), exports2); + __exportStar2(require_helpers3(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -38214,12 +39768,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve6, reject) => { @@ -38307,10 +39861,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38323,30 +39877,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug4 = (0, debug_1.default)("https-proxy-agent"); @@ -38457,10 +40011,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -38473,30 +40027,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug4 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -38586,18 +40140,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -38628,7 +40182,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -38647,7 +40201,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -38682,7 +40236,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -38725,8 +40279,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -38738,6 +40291,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url2 = new URL(req.url); + if (!url2.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url2.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url2 = new URL(request.url); + if (url2.hostname === "localhost" || url2.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning9 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning9); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning9); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url2, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url2, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url: url2, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url2 = new URL(requestUrl); + return url2.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url2, options = {}) { + if (!options.queryParameters) { + return url2; + } + const parsedUrl = new URL(url2); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path11, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path11, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve6, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve6(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { + token = setTimeout(resolve6, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -38760,24 +42323,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -38787,7 +42358,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -38802,8 +42374,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -38842,7 +42414,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -38855,10 +42430,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -38878,18 +42454,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -38898,14 +42471,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -38913,7 +42490,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -38950,12 +42527,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -38971,54 +42547,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -39030,24 +42569,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -39061,7 +42599,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -39129,9 +42667,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -39140,41 +42680,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -39186,425 +42791,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib2 = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve6) => { - const handler = () => { - resolve6(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - 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: url2.hostname, - path: `${url2.pathname}${url2.search}`, - port: url2.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve6, reject) => { - const req = isInsecure ? http.request(options, resolve6) : https2.request(options, resolve6); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib2.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib2.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve6, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve6(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -39616,7 +42913,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers2(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -39630,7 +42927,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -39643,7 +42940,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -39652,7 +42949,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -39665,14 +42965,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -39683,14 +42982,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -39731,32 +43029,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -39788,22 +43110,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -39814,6 +43175,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -39850,17 +43235,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -39904,46 +43288,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -39957,21 +43341,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -39981,28 +43365,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -40013,25 +43397,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -40059,6 +43443,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -40069,509 +43460,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -40579,6 +43467,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -40619,7 +43508,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -40633,8 +43522,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -40692,8 +43583,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -40739,7 +43631,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -40748,7 +43648,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40787,7 +43687,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -40798,514 +43700,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -41314,24 +43711,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -41347,52 +43743,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -41409,7 +43817,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -41418,12 +43825,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -41489,12 +43899,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -41558,14 +43967,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -41628,7 +44036,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -41782,7 +44189,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -41791,7 +44197,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -41799,7 +44205,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -41837,7 +44243,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -41855,7 +44261,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -41896,7 +44302,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -41942,7 +44351,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -41956,8 +44365,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -41996,7 +44404,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -42079,7 +44487,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -42089,7 +44496,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -42117,7 +44524,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -42126,7 +44532,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -42181,7 +44587,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -42227,7 +44634,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -42260,7 +44666,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -42269,25 +44674,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -42298,17 +44703,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -42316,7 +44720,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -42333,7 +44737,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -42374,7 +44778,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -42386,18 +44789,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -42431,8 +44834,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -42470,7 +44872,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -42482,7 +44885,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -42495,7 +44897,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -42504,7 +44905,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -42516,8 +44920,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -42526,9 +44930,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -42545,24 +44947,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -42587,7 +44987,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -42607,7 +45007,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -42632,16 +45031,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -42654,7 +45053,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -42663,8 +45061,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -42672,16 +45070,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -42711,7 +45109,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -42720,9 +45117,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -42765,10 +45161,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -42877,17 +45272,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -42898,31 +45292,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -42996,16 +45410,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -43017,7 +45431,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -43042,18 +45459,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -43074,10 +45491,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -43112,11 +45528,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -43154,7 +45573,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -43169,7 +45588,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43185,7 +45604,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -43226,8 +45645,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -43252,7 +45674,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -43260,10 +45684,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -43279,6 +45701,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -43288,7 +45712,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -43319,7 +45743,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -43331,15 +45757,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -43468,14 +45893,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -43497,13 +45923,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -43512,10 +45938,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -43526,17 +45955,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -43550,8 +45978,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -43559,7 +45986,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -43578,7 +46008,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -43616,7 +46047,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -43625,7 +46055,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -43636,12 +46066,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -43675,1680 +46104,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator2 = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber2(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber2; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber2 = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber2(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator2(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator2(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -45386,7 +46972,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -45420,7 +47006,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45442,6 +47028,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -45459,7 +47056,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45471,1193 +47068,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve6, reject) => { - this.resolve = resolve6; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs12 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs12); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -46683,17 +47102,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -46702,14 +47131,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -46735,16 +47164,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -46842,7 +47271,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -46877,9 +47306,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -46901,8 +47330,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url3) { - const urlParsed = new URL(url3); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); let path11 = urlParsed.pathname; path11 = path11 || "/"; path11 = escape(path11); @@ -46934,7 +47410,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -46989,15 +47465,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(url3, name) { - const urlParsed = new URL(url3); + function appendToURLPath(url2, name) { + const urlParsed = new URL(url2); let path11 = urlParsed.pathname; path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; urlParsed.pathname = path11; return urlParsed.toString(); } - function setURLParameter(url3, name, value) { - const urlParsed = new URL(url3); + function setURLParameter(url2, name, value) { + const urlParsed = new URL(url2); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -47016,34 +47492,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url3, name) { - var _a; - const urlParsed = new URL(url3); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url3, host) { - const urlParsed = new URL(url3); + function setURLHost(url2, host) { + const urlParsed = new URL(url2); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url3) { + function getURLPath(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url3) { + function getURLScheme(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url3) { - const urlParsed = new URL(url3); + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -47055,8 +47530,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url3) { - let queryString = new URL(url3).search; + function getURLQueries(url2) { + let queryString = new URL(url2).search; if (!queryString) { return {}; } @@ -47077,8 +47552,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url3, queryParts) { - const urlParsed = new URL(url3); + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -47093,7 +47568,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -47141,11 +47619,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url3) { - const parsedUrl = new URL(url3); + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -47162,31 +47660,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -47195,12 +47693,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -47281,6 +47779,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -47292,25 +47794,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -47366,22 +47882,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -47389,15 +47941,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -47422,21 +47974,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -47454,10 +48006,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -47470,9 +48022,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -47480,16 +48032,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -47505,21 +48070,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -47534,10 +48118,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -47556,6 +48151,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -47979,7 +48584,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -47996,31 +48618,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -48030,7 +48652,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48050,10 +48672,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48074,10 +48696,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path11 = getURLPath(request.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path11}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48097,6 +48719,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -48108,7 +48740,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -48126,7 +48779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -48134,10 +48787,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -48149,7 +48813,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -48157,44 +48833,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve6, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve6).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve6(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); + let path11 = urlParsed.pathname; + path11 = path11 || "/"; + path11 = escape(path11); + urlParsed.pathname = path11; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + 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); + 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); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url2, host) { + const urlParsed = new URL(url2); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url2) { + let queryString = new URL(url2).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve6, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve6(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path11 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path11}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -48210,71 +50896,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -48286,61 +50983,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -48348,12 +51059,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -48369,10 +51080,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path11 = getURLPath(request.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path11}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -48392,14 +51103,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path11 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path11}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -48416,17 +51487,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -48435,24 +51520,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -48461,6 +51590,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -48484,9 +51621,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -48509,7 +51647,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -48517,75 +51655,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -48594,28 +51743,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -48658,7 +51807,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -48730,7 +52032,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -48779,7 +52081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -48806,7 +52108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -48845,7 +52147,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -48897,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -48935,7 +52237,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -48948,6 +52250,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -48965,7 +52288,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -48983,7 +52306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -49009,7 +52332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49072,7 +52395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -49120,7 +52443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -49232,7 +52555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -49257,7 +52580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -49322,7 +52645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -49372,7 +52695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -49406,7 +52729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -49432,7 +52755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -49458,7 +52781,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -49484,7 +52807,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -49514,7 +52837,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -49578,7 +52901,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -49603,7 +52926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -49690,7 +53013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -49715,7 +53038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -50042,7 +53365,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -50113,7 +53436,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -50152,7 +53475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -50169,7 +53492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -50218,7 +53541,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -50282,7 +53605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -50326,7 +53649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -50352,7 +53675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -50378,7 +53701,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -50420,7 +53743,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -50437,7 +53760,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -50487,7 +53810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -50532,7 +53855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -50549,7 +53872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -50575,7 +53898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -50614,7 +53937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -50651,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -50667,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -50704,7 +54027,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50720,7 +54043,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -50764,7 +54087,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -50780,7 +54103,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -50817,7 +54140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -50833,7 +54156,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -50877,7 +54200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -50893,7 +54216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -50972,7 +54295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -50988,7 +54311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -51032,7 +54355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51048,7 +54371,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -51092,7 +54415,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51108,7 +54431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -51166,7 +54489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -51182,7 +54505,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -51322,7 +54645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51338,7 +54661,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -51382,7 +54705,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -51398,7 +54721,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -51456,7 +54779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -51472,7 +54795,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -51538,7 +54861,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51554,7 +54877,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -51612,7 +54935,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -51628,7 +54951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -51672,7 +54995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -51688,7 +55011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -51732,7 +55055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -51748,7 +55071,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -51778,7 +55101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -51794,7 +55117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -51831,7 +55154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -51847,7 +55170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -51905,7 +55228,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -51921,7 +55244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -51972,7 +55295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -51988,7 +55311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -52046,7 +55369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52062,7 +55385,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -52120,7 +55443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52136,7 +55459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -52194,7 +55517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52210,7 +55533,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -52261,7 +55584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -52277,7 +55600,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -52328,7 +55651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -52344,7 +55667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -52416,7 +55739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -52432,7 +55755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -52772,7 +56095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -52788,7 +56111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -53164,7 +56487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53180,7 +56503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -53224,7 +56547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -53240,7 +56563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -53284,7 +56607,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -53300,7 +56623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -53351,7 +56674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -53367,7 +56690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -53432,7 +56755,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -53448,7 +56771,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53500,7 +56823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53516,7 +56839,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -53553,7 +56876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -53569,7 +56892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -53613,7 +56936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -53629,7 +56952,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -53715,7 +57038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53731,7 +57054,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -53789,7 +57112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -53805,7 +57128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -53856,7 +57179,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -53872,7 +57195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -53930,7 +57253,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -53946,7 +57269,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -54004,7 +57327,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54020,7 +57343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -54078,7 +57401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54094,7 +57417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -54173,7 +57496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -54189,7 +57512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -54269,7 +57592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54281,11 +57604,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -54386,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -54398,11 +57735,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -54446,7 +57797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -54462,7 +57813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -54499,7 +57850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -54515,7 +57866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -54587,7 +57938,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54603,7 +57954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -54863,7 +58214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -54879,7 +58230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -54923,7 +58274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -54939,7 +58290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -54983,7 +58334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -54999,7 +58350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -55092,7 +58443,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -55108,7 +58459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -55208,7 +58559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -55224,7 +58575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -55303,7 +58654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -55319,7 +58670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -55412,7 +58763,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -55424,11 +58775,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -55493,7 +58858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -55509,7 +58874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -55574,7 +58939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -55590,7 +58955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -55655,7 +59020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -55671,7 +59036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -55736,7 +59101,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -55752,7 +59117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -55825,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -55841,7 +59206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -55934,7 +59299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -55950,7 +59315,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -56057,7 +59422,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -56073,7 +59438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -56173,7 +59538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -56185,11 +59550,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -56247,7 +59626,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -56263,7 +59642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -56356,7 +59735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -56372,7 +59751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -56465,7 +59844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -56477,11 +59856,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -56560,7 +59953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -56576,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -56655,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -56667,11 +60060,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -56771,7 +60178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -56787,7 +60194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -56859,7 +60266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -56875,189 +60282,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -57068,11 +60305,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57083,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url2 = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -57095,7 +60332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -57106,7 +60343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -57117,7 +60354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -57130,10 +60367,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -57141,7 +60378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -57151,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57162,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -57173,7 +60410,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -57184,7 +60421,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -57194,7 +60431,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -57204,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -57217,7 +60454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57235,11 +60472,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -57250,7 +60487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -57261,7 +60498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -57272,7 +60509,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -57283,7 +60520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -57294,7 +60531,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -57305,7 +60542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -57316,7 +60553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -57326,7 +60563,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -57337,7 +60574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -57349,7 +60586,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -57360,7 +60597,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -57374,7 +60611,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -57388,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -57398,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -57408,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -57418,7 +60655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -57429,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -57440,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -57458,7 +60695,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -57469,7 +60706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -57479,7 +60716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -57489,7 +60726,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -57500,7 +60737,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -57511,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -57521,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -57532,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -57543,7 +60780,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -57553,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57563,7 +60800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -57574,7 +60811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -57585,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -57596,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -57607,7 +60844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -57617,7 +60854,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -57628,7 +60865,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -57639,7 +60876,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -57668,7 +60905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -57679,7 +60916,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -57689,7 +60926,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -57699,7 +60936,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -57709,7 +60946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -57719,7 +60956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -57729,7 +60966,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -57739,7 +60976,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -57749,7 +60986,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -57759,7 +60996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -57769,7 +61006,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -57779,7 +61016,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -57789,7 +61026,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -57800,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -57810,7 +61047,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -57821,7 +61058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -57832,7 +61069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -57842,7 +61079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -57852,7 +61089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -57862,7 +61099,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -57872,7 +61109,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -57882,7 +61119,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -57892,7 +61129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -57902,7 +61139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -57913,7 +61150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -57923,7 +61160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -57934,7 +61171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -57945,7 +61182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -57956,7 +61193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -57966,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -57977,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -58004,7 +61241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -58015,7 +61252,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58029,7 +61266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58043,7 +61280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -58053,7 +61290,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -58067,7 +61304,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -58077,7 +61314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -58088,7 +61325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -58098,7 +61335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -58108,7 +61345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -58118,7 +61355,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -58129,7 +61366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -58139,7 +61376,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -58149,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -58160,7 +61397,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -58171,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -58182,7 +61429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -58193,7 +61440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -58204,7 +61451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -58232,11 +61479,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -58247,7 +61494,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -58258,11 +61505,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -58272,7 +61519,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -58282,7 +61529,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -58293,7 +61540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -58304,7 +61551,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -58315,7 +61562,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -58326,7 +61573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -58337,7 +61584,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -58348,7 +61595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -58359,7 +61606,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -58370,7 +61617,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58384,7 +61631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58398,7 +61645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -58412,7 +61659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -58423,7 +61670,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -58434,7 +61681,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -58445,7 +61692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -58455,7 +61702,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -58466,7 +61713,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -58477,7 +61724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -58487,7 +61734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -58497,7 +61744,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -58509,7 +61756,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -58520,7 +61767,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -58531,7 +61778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -58542,7 +61789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -58552,7 +61799,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -58566,7 +61813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -58576,7 +61823,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -58587,7 +61834,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -58598,7 +61845,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -58608,7 +61855,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -58619,7 +61866,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -58630,11 +61877,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -58645,7 +61892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -58658,7 +61905,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -58672,8 +61933,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -58681,7 +61942,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -58705,15 +61966,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -58723,8 +61984,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -58733,10 +61994,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58746,173 +62008,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -58921,58 +62183,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url2], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -58986,7 +62262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -58994,7 +62270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -59002,14 +62278,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -59039,8 +62315,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -59050,8 +62326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -59067,7 +62343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59075,8 +62351,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59084,8 +62360,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59093,7 +62369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -59104,8 +62380,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -59122,124 +62398,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -59258,117 +62535,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -59379,304 +62656,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -59730,8 +63021,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -59759,8 +63050,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -59784,8 +63075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59793,8 +63084,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59805,8 +63096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -59831,8 +63122,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -59843,8 +63134,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -59853,8 +63144,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -59865,8 +63156,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -59898,7 +63189,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59912,651 +63204,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -60567,112 +63875,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -60687,8 +64009,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -60696,16 +64018,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -60718,8 +64040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -60743,8 +64065,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -60753,8 +64075,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -60768,358 +64090,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -61132,8 +64470,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -61143,8 +64481,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -61155,8 +64493,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -61167,7 +64505,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61177,161 +64516,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -61348,8 +64702,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -61364,8 +64718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -61376,8 +64730,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -61389,8 +64743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -61403,8 +64757,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -61413,11 +64767,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -61427,47 +64782,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61479,51 +64834,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -61533,33 +64889,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61571,38 +64927,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -61612,45 +64969,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url2], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -61662,41 +65019,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url3, options) { - var _a, _b; - if (url3 === void 0) { + constructor(url2, options) { + if (url2 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -61705,67 +65090,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url3; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url2; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url3, pipeline) { - this.url = escapeURLPath(url3); - this.accountName = getAccountNameFromUrl(url3); + constructor(url2, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url2); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url2); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -61858,6 +65388,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -61902,22 +65476,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -62022,12 +65591,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -62074,7 +65695,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -62091,18 +65735,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -62117,8 +65899,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -62149,19 +65931,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -62228,13 +66010,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -62249,10 +66031,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -62312,38 +66094,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -62364,18 +66169,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -62386,7 +66191,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62409,18 +66214,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62433,7 +66238,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -62456,18 +66261,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62481,7 +66286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62504,23 +66309,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62533,7 +66338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -62556,27 +66361,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62589,7 +66394,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -62612,27 +66417,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -62646,7 +66451,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -62658,47 +66524,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -62720,7 +66603,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -62730,34 +66613,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -62765,73 +66649,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -62839,32 +66726,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -62877,52 +66786,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -62948,12 +66811,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -63380,7 +67300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63388,6 +67308,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -63399,13 +67321,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -63414,8 +67355,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -63427,19 +67368,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -63448,7 +67389,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -63460,17 +67401,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -63479,59 +67420,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -63588,7 +67530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -63628,87 +67570,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -63722,13 +67680,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -63738,31 +67721,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -63774,49 +67757,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -63829,8 +67835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -63884,7 +67889,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -63893,11 +67937,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -63985,6 +68028,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -64322,7 +68377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -64330,6 +68385,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -64338,52 +68395,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -64393,27 +68473,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve6, reject) => { + this.resolve = resolve6; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -64421,20 +69675,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -64442,10 +69697,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -64485,12 +69740,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString3, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -64500,27 +69764,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -64590,333 +69888,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve6, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve6).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve6(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve6, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve6(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -64924,28 +69925,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve6(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve6, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -64956,18 +69957,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve6(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve6, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve6(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve6, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -64978,9 +69991,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -64996,49 +70048,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url3; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + let url2; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -65047,8 +70099,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -65057,8 +70109,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -65088,7 +70140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -65097,76 +70149,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -65174,8 +70256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -65183,9 +70264,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -65194,7 +70275,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -65211,9 +70295,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -65224,7 +70308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -65234,7 +70318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -65245,17 +70329,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -65263,19 +70355,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65285,19 +70379,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65307,13 +70409,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -65324,7 +70426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -65336,14 +70438,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -65354,22 +70458,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65385,15 +70491,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -65403,15 +70511,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -65422,24 +70537,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -65460,57 +70577,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -65518,15 +70636,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -65538,14 +70656,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -65555,36 +70673,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65595,31 +70716,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -65627,12 +70749,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -65643,26 +70765,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -65676,8 +70801,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -65685,7 +70810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -65705,10 +70830,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -65723,7 +70851,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -65751,21 +70879,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -65773,12 +70903,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -65790,18 +70920,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve6) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve6(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -65810,17 +70946,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve6) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -65828,8 +71014,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -65840,8 +71026,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -65854,8 +71040,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -65865,60 +71051,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -65929,40 +71120,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65970,20 +71176,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65996,20 +71213,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -66018,29 +71237,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -66055,7 +71289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -66069,74 +71303,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -66148,8 +71397,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -66158,15 +71407,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -66182,26 +71448,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -66219,7 +71487,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -66230,32 +71498,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66280,22 +71564,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -66303,10 +71602,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -66324,7 +71623,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -66341,18 +71640,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66363,30 +71663,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66394,20 +71696,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -66436,18 +71740,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -66474,7 +71778,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -66495,23 +71799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -66521,32 +71824,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -66572,15 +71875,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -66599,27 +71905,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -66637,50 +71943,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -66691,13 +72005,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -66705,23 +72019,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -66730,21 +72046,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66752,7 +72080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -66760,19 +72088,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -66785,7 +72115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -66796,32 +72126,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -66830,13 +72163,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -66846,7 +72181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -66855,16 +72190,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -66872,22 +72209,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -66907,17 +72246,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -66926,94 +72263,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -67039,13 +72361,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67055,17 +72380,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -67074,7 +72401,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -67082,20 +72409,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67116,17 +72445,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -67136,94 +72463,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -67232,7 +72553,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -67250,13 +72573,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -67264,24 +72590,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -67289,12 +72617,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -67302,22 +72632,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67327,38 +72659,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -67369,15 +72735,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -67389,18 +72755,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -67420,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -67435,7 +72801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -67450,6 +72816,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -67489,6 +72865,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve6(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -67505,11 +72883,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -67533,13 +72936,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -67551,13 +72954,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url3; + let url2; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url3 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url2 = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -67566,28 +72969,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url3; + let url2; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url3 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url2 = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -67595,24 +72998,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -67625,9 +73036,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -67636,19 +73047,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -67657,23 +73068,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path11 = getURLPath(subRequest.url); + const path11 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path11 || path11 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -67684,7 +73095,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -67701,7 +73112,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -67712,7 +73123,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -67723,18 +73134,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url3, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path11 = getURLPath(url3); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path11 = (0, utils_common_js_1.getURLPath)(url2); if (path11 && path11 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -67746,10 +73175,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -67760,7 +73189,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -67778,11 +73207,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -67790,17 +73233,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -67809,10 +73267,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -67829,7 +73289,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -67838,48 +73326,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url3, pipeline); + super(url2, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -67887,34 +73375,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -67931,7 +73437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -67953,7 +73459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -67961,7 +73467,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -67971,15 +73477,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -67987,12 +73505,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -68005,14 +73523,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -68020,8 +73542,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68032,19 +73554,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68056,24 +73585,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -68086,7 +73615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -68094,8 +73623,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -68144,29 +73673,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -68181,7 +73710,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -68195,7 +73724,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -68205,10 +73734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -68220,14 +73749,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -68240,18 +73769,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -68260,23 +73809,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -68292,44 +73864,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -68337,64 +73891,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -68402,41 +73955,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -68455,7 +74011,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68472,17 +74031,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -68490,35 +74047,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -68526,118 +74070,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -68655,7 +74219,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -68676,23 +74243,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68712,18 +74283,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68734,27 +74303,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68764,53 +74317,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68818,11 +74372,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68834,7 +74387,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68853,7 +74408,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68862,14 +74420,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68881,7 +74439,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -68901,18 +74459,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve6) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve6(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -68921,45 +74482,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve6) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -69063,6 +74657,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -69070,7 +74716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69117,12 +74763,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -69148,10 +74799,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -69168,13 +74831,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -69203,6 +74870,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -69224,44 +74907,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -69272,22 +74973,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -69302,35 +75031,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url3, credentialOrPipeline, options) { + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url3, pipeline); + super(url2, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -69341,22 +75070,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -69373,7 +75111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -69387,47 +75125,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69436,15 +75156,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69454,14 +75174,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69472,14 +75192,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -69487,7 +75207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -69499,9 +75219,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -69522,23 +75248,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -69558,18 +75288,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -69580,27 +75308,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -69608,57 +75320,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -69670,7 +75378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -69682,7 +75390,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -69701,7 +75411,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69717,45 +75430,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -69763,45 +75458,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -69823,7 +75514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -69835,17 +75526,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -69864,7 +75558,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -69874,16 +75571,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -69897,19 +75594,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69917,7 +75622,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69925,21 +75630,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -69947,7 +75653,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -69955,66 +75661,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -70099,7 +75863,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70112,21 +75876,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -70154,9 +75928,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core12 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core12 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -70239,15 +76014,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -70266,7 +76043,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -70274,7 +76050,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70287,21 +76063,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -70329,9 +76115,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib4(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -70339,14 +76130,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -70358,14 +76147,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -70402,9 +76190,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -70428,13 +76215,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -70442,7 +76371,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70455,21 +76384,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -70497,20 +76436,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs12 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs12 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -70612,10 +76554,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs12.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -70635,17 +76577,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs12.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -70662,7 +76603,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -70675,7 +76616,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -70699,9 +76640,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -70722,8 +76662,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -70739,8 +76679,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -70784,8 +76724,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve6) => { timeoutHandle = setTimeout(() => resolve6("timeout"), timeoutMs); @@ -70802,7 +76741,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -70815,23 +76754,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core12 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core12 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -70856,7 +76806,6 @@ var require_options = __commonJS({ core12.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -70898,7 +76847,6 @@ var require_options = __commonJS({ core12.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -70907,7 +76855,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -70916,13 +76866,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -70934,7 +76882,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -70943,7 +76890,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -70980,22 +76927,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -71006,12 +76957,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -71019,7 +76969,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -71032,21 +76982,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -71074,13 +77034,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core12 = __importStar4(require_core()); - var http_client_1 = require_lib4(); - var auth_1 = require_auth2(); - var fs12 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core12 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs12 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -71113,11 +77076,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -71140,11 +77103,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -71161,7 +77123,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -71177,9 +77139,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -71187,24 +77148,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core12.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -71213,7 +77173,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs12.openSync(archivePath, "r"); @@ -71224,7 +77184,7 @@ Other caches with similar key:`); core12.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -71247,15 +77207,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -71277,7 +77237,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -72872,26 +78831,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -72900,22 +78859,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -72929,10 +78888,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -73137,26 +79096,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -73168,26 +79127,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -73437,7 +79396,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -73450,13 +79409,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -73468,19 +79427,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -73585,8 +79544,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -74156,18 +80115,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74358,7 +80317,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -74467,7 +80426,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -74475,7 +80434,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -74489,7 +80448,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -74581,9 +80540,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -74604,7 +80563,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -74753,7 +80712,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -74800,7 +80759,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74822,7 +80781,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -74871,7 +80830,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -74892,7 +80851,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -74940,7 +80899,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -74961,7 +80920,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -75009,7 +80968,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -75029,7 +80988,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -75059,7 +81018,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -75133,7 +81092,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -75303,7 +81262,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -75427,7 +81386,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75513,11 +81472,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -75589,11 +81548,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -75655,17 +81614,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -76140,7 +82099,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -76208,11 +82167,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url2) { if (!url2) @@ -76228,7 +82188,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url2} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -76241,7 +82200,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -76249,7 +82207,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -76277,16 +82235,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib4(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -76310,14 +82268,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { 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* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; @@ -76327,7 +82285,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -76398,7 +82356,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } @@ -76418,7 +82376,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -76426,7 +82383,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76439,21 +82396,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -76481,16 +82448,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path11 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path11 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -76522,8 +82491,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -76553,8 +82522,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -76576,7 +82545,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -76600,7 +82569,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -76625,7 +82594,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -76639,37 +82608,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path11.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -76682,21 +82648,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -76724,15 +82700,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core12 = __importStar4(require_core()); - var path11 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core12 = __importStar2(require_core()); + var path11 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib4(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -76781,9 +82760,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76796,9 +82774,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core12.debug("Resolved Keys:"); @@ -76855,8 +82832,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -76927,8 +82904,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -76942,10 +82919,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -77006,8 +82982,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -77093,432 +83069,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs12 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs12.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path11.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path11.dirname(filePath); - const upperName = path11.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path11.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path11 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path11.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path11.join(dest, path11.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path11.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path11.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path11.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os2.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os2 = require("os"); - var cp = require("child_process"); - var fs12 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os2.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs12 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs12.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs12.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os2.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs12.existsSync(lsbReleaseFile)) { - contents = fs12.readFileSync(lsbReleaseFile).toString(); - } else if (fs12.existsSync(osReleaseFile)) { - contents = fs12.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path11 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path11.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs12 = __importStar2(require("fs")); + var path11 = __importStar2(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs12.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path11.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path11.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path11 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path11.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path11.join(dest, path11.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path11.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path11.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path11.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os2 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path11 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os2.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path11.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve6(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os2 = __importStar2(require("os")); + var path11 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path11.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os2.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning9(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning9; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os2.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os2 = require("os"); + var cp = require("child_process"); + var fs12 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os2.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os2.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs12.existsSync(lsbReleaseFile)) { + contents = fs12.readFileSync(lsbReleaseFile).toString(); + } else if (fs12.existsSync(osReleaseFile)) { + contents = fs12.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core12 = __importStar4(require_core()); + var core12 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core12 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs12 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core12 = __importStar2(require_core3()); + var io6 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs12 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os2 = __importStar2(require("os")); + var path11 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path11.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path11.dirname(dest)); core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs12.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core12.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os2.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path11.join(_getTempDirectory(), crypto.randomUUID()); + dest = path11.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve6(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve6(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve6(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve6(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve6(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug4; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug4 = require_debug2(); + var debug4 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -83250,13 +90130,13 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -86730,12 +93610,12 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -87230,7 +94110,7 @@ ${jsonContents}` } // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -87369,7 +94249,7 @@ var import_child_process = require("child_process"); var fs6 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -87528,7 +94408,7 @@ var os = __toESM(require("os")); var path6 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); @@ -89269,13 +96149,13 @@ function fromString(str2, unsigned, radix) { return result; } Long.fromString = fromString; -function fromValue(val2, unsigned) { - if (typeof val2 === "number") return fromNumber(val2, unsigned); - if (typeof val2 === "string") return fromString(val2, unsigned); +function fromValue(val, unsigned) { + if (typeof val === "number") return fromNumber(val, unsigned); + if (typeof val === "string") return fromString(val, unsigned); return fromBits( - val2.low, - val2.high, - typeof unsigned === "boolean" ? unsigned : val2.unsigned + val.low, + val.high, + typeof unsigned === "boolean" ? unsigned : val.unsigned ); } Long.fromValue = fromValue; @@ -89347,8 +96227,8 @@ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val2 = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) if ((val2 & 1 << bit) != 0) break; + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; LongPrototype.isSafeInteger = function isSafeInteger() { @@ -89968,7 +96848,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index f7da24462..694fd156c 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var os = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve2({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path2 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path2.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs2.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs2.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path2.dirname(filePath); const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path2.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path2 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner5 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable5; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug4; + exports2.error = error3; + exports2.warning = warning10; + exports2.notice = notice; + exports2.info = info7; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable5(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable5; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug4(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug4; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning10(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning10; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info7(message) { process.stdout.write(message + os.EOL); } - exports2.info = info7; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ 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* () { + const proxyFetch = (url, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs2.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29255,7 +28969,7 @@ var require_dist_node15 = __commonJS({ var require_config = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/config.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -29267,7 +28981,7 @@ var require_config = __commonJS({ exports2.getConcurrency = getConcurrency; exports2.getUploadChunkTimeout = getUploadChunkTimeout; exports2.getMaxArtifactListCount = getMaxArtifactListCount; - var os_1 = __importDefault4(require("os")); + var os_1 = __importDefault2(require("os")); var core_1 = require_core(); function getUploadChunkSize() { return 8 * 1024 * 1024; @@ -30936,26 +30650,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -30964,22 +30678,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -30993,10 +30707,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -31201,26 +30915,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -31232,26 +30946,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -31501,7 +31215,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -31514,13 +31228,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -31532,19 +31246,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -31649,8 +31363,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -32220,11 +31934,11 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } @@ -33280,7 +32994,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -33294,7 +33008,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -33386,9 +33100,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -33558,7 +33272,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33605,7 +33319,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -33627,7 +33341,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33676,7 +33390,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -33697,7 +33411,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33745,7 +33459,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -33766,7 +33480,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33814,7 +33528,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -33834,7 +33548,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -33938,7 +33652,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -35525,7 +35239,7 @@ var require_artifact_twirp_client = __commonJS({ var require_generated = __commonJS({ "node_modules/@actions/artifact/lib/generated/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -35538,14 +35252,14 @@ var require_generated = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar4(require_timestamp(), exports2); - __exportStar4(require_wrappers(), exports2); - __exportStar4(require_artifact(), exports2); - __exportStar4(require_artifact_twirp_client(), exports2); + __exportStar2(require_timestamp(), exports2); + __exportStar2(require_wrappers(), exports2); + __exportStar2(require_artifact(), exports2); + __exportStar2(require_artifact_twirp_client(), exports2); } }); @@ -35553,7 +35267,7 @@ var require_generated = __commonJS({ var require_retention = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/retention.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -35566,34 +35280,34 @@ var require_retention = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = getExpiration; var generated_1 = require_generated(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; @@ -35678,817 +35392,12 @@ The following characters are not allowed in files that are uploaded due to limit } }); -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js -var require_lib3 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/artifact/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact/package.json var require_package2 = __commonJS({ "node_modules/@actions/artifact/package.json"(exports2, module2) { module2.exports = { name: "@actions/artifact", - version: "4.0.0", + version: "5.0.1", preview: true, description: "Actions artifact lib", keywords: [ @@ -36528,11 +35437,10 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.10.0", + "@actions/core": "^2.0.0", "@actions/github": "^6.0.1", - "@actions/http-client": "^2.1.0", - "@azure/core-http": "^3.0.5", - "@azure/storage-blob": "^12.15.0", + "@actions/http-client": "^3.0.0", + "@azure/storage-blob": "^12.29.1", "@octokit/core": "^5.2.1", "@octokit/plugin-request-log": "^1.0.4", "@octokit/plugin-retry": "^3.0.9", @@ -36709,7 +35617,7 @@ var require_jwt_decode_cjs = __commonJS({ var require_util8 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -36722,40 +35630,40 @@ var require_util8 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = getBackendIdsFromToken; exports2.maskSigUrl = maskSigUrl; exports2.maskSecretUrls = maskSecretUrls; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var config_1 = require_config(); - var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); + var jwt_decode_1 = __importDefault2(require_jwt_decode_cjs()); var core_1 = require_core(); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); function getBackendIdsFromToken() { @@ -36819,7 +35727,7 @@ var require_util8 = __commonJS({ var require_artifact_twirp_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/shared/artifact-twirp-client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -36848,8 +35756,8 @@ var require_artifact_twirp_client2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.internalArtifactTwirpClient = internalArtifactTwirpClient; - var http_client_1 = require_lib3(); - var auth_1 = require_auth2(); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); var core_1 = require_core(); var generated_1 = require_generated(); var config_1 = require_config(); @@ -36879,14 +35787,14 @@ var require_artifact_twirp_client2 = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -36896,7 +35804,7 @@ var require_artifact_twirp_client2 = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -36967,7 +35875,7 @@ var require_artifact_twirp_client2 = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } @@ -36994,7 +35902,7 @@ var require_artifact_twirp_client2 = __commonJS({ var require_upload_zip_specification = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-zip-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -37007,34 +35915,34 @@ var require_upload_zip_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - var fs2 = __importStar4(require("fs")); + var fs2 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); @@ -37084,963 +35992,7 @@ var require_upload_zip_specification = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug5, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug5(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug4 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug4("azure"); - AzureLogger.log = (...args) => { - debug4.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug4.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug4.disable(); - debug4.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs3(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve2, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve2(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { - token = setTimeout(resolve2, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs4(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -38068,6 +36020,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -38392,7 +36345,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -38468,9 +36421,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path2, preserveJsx) { + if (typeof path2 === "string" && /^\.\.?\//.test(path2)) { + return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path2; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -38480,7 +36441,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -38507,6 +36468,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -38517,6 +36486,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -38538,400 +36511,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants7 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants7(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs4(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); - } else { - return stream; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs4(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -38945,295 +36533,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs5(); - var StandardAbortMessage = "The operation was aborted."; - function delay(delayInMs, value, options) { - return new Promise((resolve2, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve2(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug4, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug4(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs4(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs5(); - var constants_js_1 = require_constants7(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants7(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -39246,6 +36836,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -39269,8 +36860,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -39321,21 +36911,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID; + function randomUUID() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve2) => { + const handler = () => { + resolve2(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + } + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve2, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve2) : node_https_1.default.request(options, resolve2); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; + } + function streamToText(stream) { + return new Promise((resolve2, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream.on("end", () => { + resolve2(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants7 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants7(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay(delayInMs, value, options) { + return new Promise((resolve2, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve2(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants7(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants7(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs4(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -39344,7 +38329,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -39379,7 +38364,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -39388,7 +38373,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -39418,16 +38403,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -39580,8 +38565,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -39686,11 +38671,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -40094,17 +39079,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -40176,7 +39161,7 @@ var require_src = __commonJS({ var require_helpers2 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -40189,24 +39174,24 @@ var require_helpers2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream) { let length = 0; const chunks = []; @@ -40243,10 +39228,10 @@ var require_helpers2 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -40259,29 +39244,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers2(), exports2); + __exportStar2(require_helpers2(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -40402,12 +39387,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve2, reject) => { @@ -40495,10 +39480,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -40511,30 +39496,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug4 = (0, debug_1.default)("https-proxy-agent"); @@ -40645,10 +39630,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -40661,30 +39646,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug4 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -40774,18 +39759,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -40816,7 +39801,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -40835,7 +39820,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -40870,7 +39855,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -40913,8 +39898,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -40926,6 +39910,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } else { + return stream; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning10 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning10); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning10); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== void 0 ? void 0 : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return url.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path2, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path2, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs3(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs4(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants7(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants7(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants7(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs5 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs5(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve2, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve2(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { + token = setTimeout(resolve2, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs6 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs6(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -40948,24 +41942,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -40975,7 +41977,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -40990,8 +41993,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -41030,7 +42033,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -41043,10 +42049,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -41066,18 +42073,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -41086,14 +42090,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -41101,7 +42109,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -41138,12 +42146,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41159,54 +42166,17 @@ var require_commonjs6 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs4(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs3(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -41218,24 +42188,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs6(); - var constants_js_1 = require_constants7(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs4(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs7(); + var constants_js_1 = require_constants8(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs6(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -41249,7 +42218,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -41317,9 +42286,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -41328,41 +42299,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs4(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs6(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -41374,425 +42410,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs5(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream) { - return new Promise((resolve2) => { - const handler = () => { - resolve2(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.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, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve2, reject) => { - const req = isInsecure ? http.request(options, resolve2) : https2.request(options, resolve2); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; - } - function streamToText(stream) { - return new Promise((resolve2, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve2(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs3(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs3(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs4(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs3(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants7(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants7(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants7(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs4(); + var constants_js_1 = require_constants8(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -41804,7 +42532,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers(); + var core_util_1 = require_commonjs6(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -41818,7 +42546,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -41831,7 +42559,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -41840,7 +42568,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -41853,14 +42584,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -41871,14 +42601,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -41919,32 +42648,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -41976,22 +42729,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -42002,6 +42794,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -42038,17 +42854,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -42092,46 +42907,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -42145,21 +42960,21 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -42169,28 +42984,28 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -42201,25 +43016,25 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -42247,6 +43062,13 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -42257,509 +43079,6 @@ var require_commonjs7 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -42767,6 +43086,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -42807,7 +43127,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs4(); + var core_util_1 = require_commonjs6(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -42821,8 +43141,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs4(); + var core_util_1 = require_commonjs6(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -42880,8 +43202,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs4(); + var core_util_1 = require_commonjs6(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -42927,7 +43250,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -42936,7 +43267,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -42975,7 +43306,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -42986,514 +43319,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _2, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_2 = accept(result.get)) descriptor.get = _2; - if (_2 = accept(result.set)) descriptor.set = _2; - if (_2 = accept(result.init)) initializers.unshift(_2); - } else if (_2 = accept(result)) { - if (kind === "field") initializers.unshift(_2); - else descriptor[key] = _2; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_2 = 0)), _2) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t[1]) { - _2.label = t[1]; - t = op; - break; - } - if (t && _2.label < t[2]) { - _2.label = t[2]; - _2.ops.push(op); - break; - } - if (t[2]) _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -43502,24 +43330,23 @@ var require_base642 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -43539,48 +43366,60 @@ var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -43597,7 +43436,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -43606,12 +43444,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base642()); var interfaces_js_1 = require_interfaces(); var utils_js_1 = require_utils5(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -43677,12 +43518,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -43746,14 +43586,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -43816,7 +43655,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -43970,7 +43808,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -43979,7 +43816,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -43987,7 +43824,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -44025,7 +43862,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -44043,7 +43880,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -44084,7 +43921,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -44130,7 +43970,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -44144,8 +43984,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -44184,7 +44023,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -44267,7 +44106,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -44277,7 +44115,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -44305,7 +44143,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -44314,7 +44151,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -44369,7 +44206,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -44415,7 +44253,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -44448,7 +44285,6 @@ var require_operationHelpers = __commonJS({ } return info7; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -44457,25 +44293,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs8(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -44486,17 +44322,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -44504,7 +44339,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -44521,7 +44356,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -44562,7 +44397,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -44574,18 +44408,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -44619,8 +44453,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -44658,7 +44491,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -44670,7 +44504,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -44683,7 +44516,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -44692,7 +44524,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -44704,8 +44539,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -44714,9 +44549,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -44733,24 +44566,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -44775,7 +44606,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -44795,7 +44626,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -44820,16 +44650,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs8(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -44842,7 +44672,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -44851,8 +44680,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs7(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs8(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -44860,16 +44689,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -44899,7 +44728,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -44908,9 +44736,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -44953,10 +44780,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -45065,17 +44891,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs4(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -45086,31 +44911,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs7(); - var pipeline_js_1 = require_pipeline2(); + var core_rest_pipeline_1 = require_commonjs8(); + var pipeline_js_1 = require_pipeline3(); var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -45184,16 +45029,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -45205,7 +45050,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -45230,18 +45078,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base642(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -45262,10 +45110,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -45300,11 +45147,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -45342,7 +45192,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -45357,7 +45207,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45373,7 +45223,7 @@ var require_commonjs9 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -45414,8 +45264,11 @@ var require_util9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs7(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs8(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -45440,7 +45293,9 @@ var require_util9 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -45448,10 +45303,8 @@ var require_util9 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -45467,6 +45320,8 @@ var require_util9 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -45476,7 +45331,7 @@ var require_util9 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -45507,7 +45362,9 @@ var require_util9 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -45519,15 +45376,14 @@ var require_util9 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -45656,14 +45512,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs7(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs8(); var util_js_1 = require_util9(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -45685,13 +45542,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -45700,10 +45557,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -45714,17 +45574,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs7(); - var core_client_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_client_1 = require_commonjs10(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -45738,8 +45597,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -45747,7 +45605,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -45766,7 +45627,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util9(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -45804,7 +45666,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -45813,7 +45674,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util9(); function convertHttpClient(requestPolicyClient) { @@ -45824,12 +45685,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45863,1680 +45723,837 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util10 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util10(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util10(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util10(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_2, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _2 = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _2), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -47574,7 +46591,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -47608,7 +46625,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs12 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -47630,6 +46647,17 @@ var require_commonjs11 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs4(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -47647,7 +46675,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs13 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -47659,1193 +46687,15 @@ var require_commonjs12 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs4(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve2, reject) => { - this.resolve = resolve2; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs7(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs8(); - var coreUtil = require_commonjs4(); - var coreHttpCompat = require_commonjs10(); - var coreClient = require_commonjs9(); - var coreXml = require_commonjs11(); - var logger$1 = require_dist(); - var abortController = require_commonjs12(); - var crypto = require("crypto"); - var coreTracing = require_commonjs6(); - var stream = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs2 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs2); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -48871,17 +46721,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -48890,14 +46750,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -48923,16 +46783,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -49030,7 +46890,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -49065,9 +46925,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -49089,8 +46949,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants9(); + function escapeURLPath(url) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 || "/"; path2 = escape(path2); @@ -49122,7 +47029,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -49177,15 +47084,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(url, name) { + const urlParsed = new URL(url); let path2 = urlParsed.pathname; path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; urlParsed.pathname = path2; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -49204,34 +47111,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { - var _a; - const urlParsed = new URL(url2); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url, host) { + const urlParsed = new URL(url); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url); 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(url) { + const urlParsed = new URL(url); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -49243,8 +47149,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url) { + let queryString = new URL(url).search; if (!queryString) { return {}; } @@ -49265,8 +47171,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -49281,7 +47187,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -49329,11 +47238,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -49350,31 +47279,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -49383,12 +47312,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -49469,6 +47398,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -49480,25 +47413,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -49554,22 +47501,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs13(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -49577,15 +47560,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -49610,21 +47593,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -49642,10 +47625,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -49658,9 +47641,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -49668,16 +47651,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -49693,21 +47689,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -49722,10 +47737,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -49744,6 +47770,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -50167,7 +48203,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -50184,31 +48237,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -50218,7 +48271,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -50238,10 +48291,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -50262,10 +48315,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -50285,6 +48338,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -50296,7 +48359,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -50314,7 +48398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -50322,10 +48406,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -50337,7 +48432,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -50345,44 +48452,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve2, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve2).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve2(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs8(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 || "/"; + path2 = escape(path2); + urlParsed.pathname = path2; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + function escape(text) { + return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); + } + function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path2 = urlParsed.pathname; + path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; + urlParsed.pathname = path2; + return urlParsed.toString(); + } + function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve2, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve2(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs4(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs14(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs14(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -50398,71 +50515,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -50474,61 +50602,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -50536,12 +50678,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -50557,10 +50699,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path2 = getURLPath(request.url) || "/"; + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path2}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -50580,14 +50722,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs13(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path2}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -50604,17 +51106,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -50623,24 +51139,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants9(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_client_1 = require_commonjs10(); + var core_xml_1 = require_commonjs12(); + var core_auth_1 = require_commonjs9(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants9(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs15(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -50649,6 +51209,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -50672,9 +51240,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -50697,7 +51266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -50705,75 +51274,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -50782,28 +51362,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -50846,7 +51426,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -50918,7 +51651,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -50967,7 +51700,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -50994,7 +51727,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -51033,7 +51766,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -51085,7 +51818,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -51123,7 +51856,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -51136,6 +51869,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -51153,7 +51907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -51171,7 +51925,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -51197,7 +51951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -51260,7 +52014,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -51308,7 +52062,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -51420,7 +52174,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -51445,7 +52199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -51510,7 +52264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -51560,7 +52314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -51594,7 +52348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -51620,7 +52374,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -51646,7 +52400,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -51672,7 +52426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -51702,7 +52456,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -51766,7 +52520,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -51791,7 +52545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -51878,7 +52632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -51903,7 +52657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -52230,7 +52984,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -52301,7 +53055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -52340,7 +53094,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -52357,7 +53111,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -52406,7 +53160,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -52445,7 +53199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -52470,7 +53224,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -52514,7 +53268,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -52540,7 +53294,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -52566,7 +53320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -52608,7 +53362,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -52625,7 +53379,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -52675,7 +53429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -52720,7 +53474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -52737,7 +53491,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -52763,7 +53517,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -52802,7 +53556,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -52839,7 +53593,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -52855,7 +53609,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -52892,7 +53646,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -52908,7 +53662,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -52952,7 +53706,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -52968,7 +53722,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -53005,7 +53759,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -53021,7 +53775,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -53065,7 +53819,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -53081,7 +53835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -53160,7 +53914,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -53176,7 +53930,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -53220,7 +53974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -53236,7 +53990,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -53280,7 +54034,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -53296,7 +54050,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -53354,7 +54108,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -53370,7 +54124,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -53510,7 +54264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -53526,7 +54280,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -53570,7 +54324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -53586,7 +54340,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -53644,7 +54398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -53660,7 +54414,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -53726,7 +54480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -53742,7 +54496,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -53800,7 +54554,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -53816,7 +54570,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -53860,7 +54614,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -53876,7 +54630,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -53920,7 +54674,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -53936,7 +54690,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -53966,7 +54720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -53982,7 +54736,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -54019,7 +54773,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -54035,7 +54789,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -54093,7 +54847,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -54109,7 +54863,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -54160,7 +54914,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -54176,7 +54930,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -54234,7 +54988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -54250,7 +55004,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -54308,7 +55062,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -54324,7 +55078,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -54382,7 +55136,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -54398,7 +55152,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -54449,7 +55203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -54465,7 +55219,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -54516,7 +55270,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -54532,7 +55286,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -54604,7 +55358,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -54620,7 +55374,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -54960,7 +55714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -54976,7 +55730,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -55352,7 +56106,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -55368,7 +56122,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -55412,7 +56166,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -55428,7 +56182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -55472,7 +56226,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -55488,7 +56242,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -55539,7 +56293,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -55555,7 +56309,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -55620,7 +56374,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -55636,7 +56390,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -55688,7 +56442,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -55704,7 +56458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -55741,7 +56495,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -55757,7 +56511,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -55801,7 +56555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -55817,7 +56571,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -55903,7 +56657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -55919,7 +56673,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -55977,7 +56731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -55993,7 +56747,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -56044,7 +56798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -56060,7 +56814,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -56118,7 +56872,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -56134,7 +56888,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -56192,7 +56946,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -56208,7 +56962,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -56266,7 +57020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -56282,7 +57036,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -56361,7 +57115,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -56377,7 +57131,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -56457,7 +57211,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -56469,11 +57223,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -56574,7 +57342,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -56586,11 +57354,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -56634,7 +57416,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -56650,7 +57432,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -56687,7 +57469,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -56703,7 +57485,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -56775,7 +57557,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -56791,7 +57573,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -57051,7 +57833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -57067,7 +57849,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -57111,7 +57893,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -57127,7 +57909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -57171,7 +57953,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -57187,7 +57969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -57280,7 +58062,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -57296,7 +58078,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -57396,7 +58178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -57412,7 +58194,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -57491,7 +58273,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -57507,7 +58289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -57600,7 +58382,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -57612,11 +58394,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -57681,7 +58477,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -57697,7 +58493,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -57762,7 +58558,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -57778,7 +58574,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -57843,7 +58639,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -57859,7 +58655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -57924,7 +58720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -57940,7 +58736,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -58013,7 +58809,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -58029,7 +58825,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -58122,7 +58918,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -58138,7 +58934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -58245,7 +59041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -58261,7 +59057,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -58361,7 +59157,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -58373,11 +59169,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -58435,7 +59245,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -58451,7 +59261,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -58544,7 +59354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -58560,7 +59370,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -58653,7 +59463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -58665,11 +59475,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -58748,7 +59572,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -58764,7 +59588,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -58843,7 +59667,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -58855,11 +59679,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -58959,7 +59797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -58975,7 +59813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -59047,7 +59885,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -59063,189 +59901,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -59256,11 +59924,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -59271,7 +59939,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -59283,7 +59951,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -59294,7 +59962,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -59305,7 +59973,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -59318,10 +59986,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -59329,7 +59997,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -59339,7 +60007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -59350,7 +60018,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -59361,7 +60029,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -59372,7 +60040,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -59382,7 +60050,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -59392,7 +60060,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -59405,7 +60073,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -59423,11 +60091,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -59438,7 +60106,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -59449,7 +60117,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -59460,7 +60128,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -59471,7 +60139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -59482,7 +60150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -59493,7 +60161,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -59504,7 +60172,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -59514,7 +60182,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -59525,7 +60193,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -59537,7 +60205,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -59548,7 +60216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -59562,7 +60230,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -59576,7 +60244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -59586,7 +60254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -59596,7 +60264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -59606,7 +60274,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -59617,7 +60285,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -59628,7 +60296,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -59646,7 +60314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -59657,7 +60325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -59667,7 +60335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -59677,7 +60345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -59688,7 +60356,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -59699,7 +60367,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -59709,7 +60377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -59720,7 +60388,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -59731,7 +60399,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -59741,7 +60409,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -59751,7 +60419,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -59762,7 +60430,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -59773,7 +60441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -59784,7 +60452,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -59795,7 +60463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -59805,7 +60473,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -59816,7 +60484,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -59827,7 +60495,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -59856,7 +60524,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -59867,7 +60535,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -59877,7 +60545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -59887,7 +60555,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -59897,7 +60565,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -59907,7 +60575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -59917,7 +60585,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -59927,7 +60595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -59937,7 +60605,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -59947,7 +60615,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -59957,7 +60625,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -59967,7 +60635,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -59977,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -59988,7 +60656,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -59998,7 +60666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -60009,7 +60677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -60020,7 +60688,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -60030,7 +60698,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -60040,7 +60708,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -60050,7 +60718,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -60060,7 +60728,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -60070,7 +60738,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -60080,7 +60748,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -60090,7 +60758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -60101,7 +60769,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -60111,7 +60779,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -60122,7 +60790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -60133,7 +60801,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -60144,7 +60812,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -60154,7 +60822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -60165,7 +60833,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -60192,7 +60860,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -60203,7 +60871,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -60217,7 +60885,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -60231,7 +60899,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -60241,7 +60909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -60255,7 +60923,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -60265,7 +60933,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -60276,7 +60944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -60286,7 +60954,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -60296,7 +60964,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -60306,7 +60974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -60317,7 +60985,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -60327,7 +60995,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -60337,7 +61005,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -60348,7 +61016,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -60359,7 +61037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -60370,7 +61048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -60381,7 +61059,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -60392,7 +61070,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -60420,11 +61098,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -60435,7 +61113,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -60446,11 +61124,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -60460,7 +61138,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -60470,7 +61148,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -60481,7 +61159,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -60492,7 +61170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -60503,7 +61181,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -60514,7 +61192,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -60525,7 +61203,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -60536,7 +61214,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -60547,7 +61225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -60558,7 +61236,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -60572,7 +61250,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -60586,7 +61264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -60600,7 +61278,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -60611,7 +61289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -60622,7 +61300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -60633,7 +61311,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -60643,7 +61321,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -60654,7 +61332,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -60665,7 +61343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -60675,7 +61353,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -60685,7 +61363,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -60697,7 +61375,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -60708,7 +61386,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -60719,7 +61397,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -60730,7 +61408,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -60740,7 +61418,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -60754,7 +61432,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -60764,7 +61442,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -60775,7 +61453,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -60786,7 +61464,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -60796,7 +61474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -60807,7 +61485,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -60818,11 +61496,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -60833,7 +61511,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -60846,7 +61524,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -60860,8 +61552,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -60869,7 +61561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -60893,15 +61585,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -60911,8 +61603,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -60921,10 +61613,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -60934,173 +61627,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -61109,58 +61802,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -61174,7 +61881,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -61182,7 +61889,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -61190,14 +61897,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -61227,8 +61934,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -61238,8 +61945,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -61255,7 +61962,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -61263,8 +61970,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -61272,8 +61979,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -61281,7 +61988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -61292,8 +61999,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -61310,124 +62017,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -61446,117 +62154,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -61567,304 +62275,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -61918,8 +62640,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -61947,8 +62669,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -61972,8 +62694,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -61981,8 +62703,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -61993,8 +62715,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -62019,8 +62741,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -62031,8 +62753,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -62041,8 +62763,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -62053,8 +62775,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -62086,7 +62808,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -62100,651 +62823,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -62755,112 +63494,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -62875,8 +63628,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -62884,16 +63637,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -62906,8 +63659,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -62931,8 +63684,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -62941,8 +63694,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -62956,358 +63709,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -63320,8 +64089,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -63331,8 +64100,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -63343,8 +64112,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -63355,7 +64124,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -63365,161 +64135,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs10()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -63536,8 +64321,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -63552,8 +64337,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -63564,8 +64349,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -63577,8 +64362,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -63591,8 +64376,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -63601,11 +64386,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -63615,47 +64401,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -63667,51 +64453,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -63721,33 +64508,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -63759,38 +64546,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -63800,45 +64588,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -63850,41 +64638,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs11()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url2, options) { - var _a, _b; - if (url2 === void 0) { + constructor(url, options) { + if (url === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -63893,67 +64709,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url2; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs7(); + var constants_js_1 = require_constants9(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -64046,6 +65007,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -64090,22 +65095,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -64210,12 +65210,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -64262,7 +65314,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -64279,18 +65354,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -64305,8 +65518,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -64337,19 +65550,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -64416,13 +65629,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -64437,10 +65650,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -64500,38 +65713,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -64552,18 +65788,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -64574,7 +65810,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -64597,18 +65833,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -64621,7 +65857,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -64644,18 +65880,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -64669,7 +65905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -64692,23 +65928,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -64721,7 +65957,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -64744,27 +65980,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -64777,7 +66013,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -64800,27 +66036,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -64834,7 +66070,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -64846,47 +66143,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs6(); + var constants_js_1 = require_constants9(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -64908,7 +66222,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -64918,34 +66232,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -64953,73 +66268,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -65027,32 +66345,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs13(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -65065,52 +66405,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -65136,12 +66430,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs6(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -65568,7 +66919,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -65576,6 +66927,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -65587,13 +66940,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -65602,8 +66974,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream2, length, options = {}) { - const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -65615,19 +66987,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream2, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream2, 1, options); + static async readByte(stream, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream2, options = {}) { + static async readZigZagLong(stream, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -65636,7 +67008,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream2, options); + byte = await _AvroParser.readByte(stream, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -65648,17 +67020,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readLong(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } - static async readInt(stream2, options = {}) { - return _AvroParser.readZigZagLong(stream2, options); + static async readInt(stream, options = {}) { + return _AvroParser.readZigZagLong(stream, options); } static async readNull() { return null; } - static async readBoolean(stream2, options = {}) { - const b = await _AvroParser.readByte(stream2, options); + static async readBoolean(stream, options = {}) { + const b = await _AvroParser.readByte(stream, options); if (b === 1) { return true; } else if (b === 0) { @@ -65667,59 +67039,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); + static async readFloat(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream2, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); + static async readDouble(stream, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream2, options = {}) { - const size = await _AvroParser.readLong(stream2, options); + static async readBytes(stream, options = {}) { + const size = await _AvroParser.readLong(stream, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream2.read(size, { abortSignal: options.abortSignal }); + return stream.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream2, options = {}) { - const u8arr = await _AvroParser.readBytes(stream2, options); + static async readString(stream, options = {}) { + const u8arr = await _AvroParser.readBytes(stream, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream2, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream2, options); - const value = await readItemMethod(stream2, options); + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream, options); + const value = await readItemMethod(stream, options); return { key, value }; } - static async readMap(stream2, readItemMethod, options = {}) { + static async readMap(stream, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream2, readItemMethod, options = {}) { + static async readArray(stream, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { + for (let count = await _AvroParser.readLong(stream, options); count !== 0; count = await _AvroParser.readLong(stream, options)) { if (count < 0) { - await _AvroParser.readLong(stream2, options); + await _AvroParser.readLong(stream, options); count = -count; } while (count--) { - const item = await readItemMethod(stream2, options); + const item = await readItemMethod(stream, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -65776,7 +67149,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -65816,87 +67189,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream2, options); + return AvroParser.readBoolean(stream, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream2, options); + return AvroParser.readInt(stream, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream2, options); + return AvroParser.readLong(stream, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream2, options); + return AvroParser.readFloat(stream, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream2, options); + return AvroParser.readDouble(stream, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream2, options); + return AvroParser.readBytes(stream, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream2, options); + return AvroParser.readString(stream, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { - const value = await AvroParser.readInt(stream2, options); + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream2, options = {}) { - const typeIndex = await AvroParser.readInt(stream2, options); - return this._types[typeIndex].read(stream2, options); + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream2, options = {}) { + read(stream, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream2, readItemMethod, options); + return AvroParser.readMap(stream, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream2, options = {}) { + async read(stream, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream2, options); + record[key] = await this._fields[key].read(stream, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -65910,13 +67299,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -65926,31 +67340,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -65962,49 +67376,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs13(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -66017,8 +67454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -66072,7 +67508,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -66081,11 +67556,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -66173,6 +67647,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs6(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -66510,7 +67996,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -66518,6 +68004,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -66526,52 +68014,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants9(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -66581,27 +68092,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs4(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants11(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants11(); + var core_util_1 = require_commonjs6(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve2, reject) => { + this.resolve = resolve2; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants11(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs16 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs6(); + var core_lro_1 = require_commonjs16(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -66609,20 +69294,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -66630,10 +69316,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -66673,12 +69359,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString2, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -66688,27 +69383,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -66778,333 +69507,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve2, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve2).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve2(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream2, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils6 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants9(); + async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve2, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream2.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve2(); return; } - let chunk = stream2.read(); + let chunk = stream.read(); if (!chunk) { return; } @@ -67112,28 +69544,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream2.on("end", () => { + stream.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve2(); }); - stream2.on("error", (msg) => { + stream.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream2, buffer2, encoding) { + async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve2, reject) => { - stream2.on("readable", () => { - let chunk = stream2.read(); + stream.on("readable", () => { + let chunk = stream.read(); if (!chunk) { return; } @@ -67144,18 +69576,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream2.on("end", () => { + stream.on("end", () => { resolve2(pos); }); - stream2.on("error", reject); + stream.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve2, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve2, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -67166,9 +69610,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs8(); + var core_auth_1 = require_commonjs9(); + var core_util_1 = require_commonjs6(); + var core_util_2 = require_commonjs6(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs15(); + var constants_js_1 = require_constants9(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils6(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -67184,49 +69667,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -67235,8 +69718,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -67245,8 +69728,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -67276,7 +69759,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -67285,76 +69768,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -67362,8 +69875,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -67371,9 +69883,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -67382,7 +69894,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -67399,9 +69914,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -67412,7 +69927,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -67422,7 +69937,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -67433,17 +69948,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -67451,19 +69974,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67473,19 +69998,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -67495,13 +70028,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -67512,7 +70045,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -67524,14 +70057,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -67542,22 +70077,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -67573,15 +70110,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -67591,15 +70130,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -67610,24 +70156,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -67648,57 +70196,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -67706,15 +70255,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -67726,14 +70275,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -67743,36 +70292,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -67783,31 +70335,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -67815,12 +70368,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -67831,26 +70384,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -67864,8 +70420,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream2 = response.readableStreamBody; - await streamToBuffer(stream2, buffer2, off - offset, chunkEnd - offset); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -67873,7 +70429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -67893,10 +70449,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -67911,7 +70470,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -67939,21 +70498,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -67961,12 +70522,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -67978,18 +70539,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -67998,17 +70565,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -68016,8 +70633,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -68028,8 +70645,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -68042,8 +70659,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -68053,60 +70670,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -68117,40 +70739,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -68158,20 +70795,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68184,20 +70832,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -68206,29 +70856,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -68243,7 +70908,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -68257,74 +70922,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -68336,8 +71016,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -68346,15 +71026,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -68370,26 +71067,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -68407,7 +71106,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -68418,32 +71117,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -68468,22 +71183,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -68491,10 +71221,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -68512,7 +71242,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -68529,18 +71259,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -68551,30 +71282,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -68582,20 +71315,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -68624,18 +71359,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -68662,7 +71397,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -68683,23 +71418,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -68709,32 +71443,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -68760,15 +71494,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -68787,27 +71524,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream2, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream2, + const scheduler = new storage_common_1.BufferScheduler( + stream, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -68825,50 +71562,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -68879,13 +71624,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -68893,23 +71638,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -68918,21 +71665,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -68940,7 +71699,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -68948,19 +71707,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -68973,7 +71734,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -68984,32 +71745,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -69018,13 +71782,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -69034,7 +71800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -69043,16 +71809,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -69060,22 +71828,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -69095,17 +71865,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -69114,94 +71882,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -69227,13 +71980,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -69243,17 +71999,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -69262,7 +72020,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -69270,20 +72028,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -69304,17 +72064,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -69324,94 +72082,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -69420,7 +72172,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -69438,13 +72192,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -69452,24 +72209,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -69477,12 +72236,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -69490,22 +72251,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -69515,38 +72278,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils6(); + var constants_js_1 = require_constants9(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs8(); + var core_http_compat_1 = require_commonjs11(); + var constants_js_1 = require_constants9(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -69557,15 +72354,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -69577,18 +72374,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -69608,7 +72405,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -69623,7 +72420,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -69638,6 +72435,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -69677,6 +72484,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve2(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -69693,11 +72502,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs6(); + var core_auth_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_2 = require_commonjs6(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs12(); + var constants_js_1 = require_constants9(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs10(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -69721,13 +72555,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -69739,13 +72573,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -69754,28 +72588,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -69783,24 +72617,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -69813,9 +72655,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -69824,19 +72666,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -69845,23 +72687,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path2 = getURLPath(subRequest.url); + const path2 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path2 || path2 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -69872,7 +72714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -69889,7 +72731,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -69900,7 +72742,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -69911,18 +72753,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path2 = getURLPath(url2); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path2 = (0, utils_common_js_1.getURLPath)(url); if (path2 && path2 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -69934,10 +72794,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -69948,7 +72808,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -69966,11 +72826,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -69978,17 +72852,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -69997,10 +72886,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -70017,7 +72908,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var core_auth_1 = require_commonjs9(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -70026,48 +72945,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { 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; - pipeline = newPipeline(new AnonymousCredential(), options); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -70075,34 +72994,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -70119,7 +73056,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -70141,7 +73078,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -70149,7 +73086,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -70159,15 +73096,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -70175,12 +73124,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -70193,14 +73142,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -70208,8 +73161,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -70220,19 +73173,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -70244,24 +73204,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -70274,7 +73234,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -70282,8 +73242,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -70332,29 +73292,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -70369,7 +73329,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -70383,7 +73343,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -70393,10 +73353,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -70408,14 +73368,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -70428,18 +73388,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -70448,23 +73428,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -70480,44 +73483,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -70525,64 +73510,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -70590,41 +73574,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -70643,7 +73630,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -70660,17 +73650,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -70678,35 +73666,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -70714,118 +73689,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -70843,7 +73838,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -70864,23 +73862,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -70900,18 +73902,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -70922,27 +73922,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -70952,53 +73936,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -71006,11 +73991,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -71022,7 +74006,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -71041,7 +74027,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -71050,14 +74039,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -71069,7 +74058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -71089,18 +74078,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve2) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve2(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -71109,45 +74101,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve2) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -71251,6 +74276,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -71258,7 +74335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -71305,12 +74382,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -71336,10 +74418,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -71356,13 +74450,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -71391,6 +74489,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -71412,44 +74526,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants9(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -71460,22 +74592,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs8(); + var core_util_1 = require_commonjs6(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -71490,35 +74650,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url2, pipeline); + super(url, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -71529,22 +74689,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -71561,7 +74730,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -71575,47 +74744,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -71624,15 +74775,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -71642,14 +74793,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -71660,14 +74811,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -71675,7 +74826,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -71687,9 +74838,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -71710,23 +74867,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -71746,18 +74907,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -71768,27 +74927,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -71796,57 +74939,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -71858,7 +74997,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -71870,7 +75009,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -71889,7 +75030,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -71905,45 +75049,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -71951,45 +75077,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -72011,7 +75133,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -72023,17 +75145,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -72052,7 +75177,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -72062,16 +75190,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -72085,19 +75213,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -72105,7 +75241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -72113,21 +75249,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -72135,7 +75272,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -72143,66 +75280,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs17 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs8(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -72210,7 +75405,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var require_blob_upload = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/blob-upload.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -72223,31 +75418,31 @@ var require_blob_upload = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -72276,18 +75471,18 @@ var require_blob_upload = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadZipToBlobStorage = uploadZipToBlobStorage; - var storage_blob_1 = require_dist7(); + var storage_blob_1 = require_commonjs17(); var config_1 = require_config(); - var core14 = __importStar4(require_core()); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); + var core14 = __importStar2(require_core()); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); var errors_1 = require_errors2(); function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let uploadByteCount = 0; let lastProgressTime = Date.now(); const abortController = new AbortController(); - const chunkTimer = (interval) => __awaiter4(this, void 0, void 0, function* () { + const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { @@ -72317,7 +75512,7 @@ var require_blob_upload = __commonJS({ }; let sha256Hash = void 0; const uploadStream = new stream.PassThrough(); - const hashStream = crypto.createHash("sha256"); + const hashStream = crypto2.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); core14.info("Beginning upload of artifact content to blob storage"); @@ -74262,8 +77457,8 @@ var require_async = __commonJS({ var mapLimit$1 = awaitify(mapLimit, 4); function concatLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, ...args) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { if (err) return iterCb(err); return iterCb(err, args); }); @@ -74469,10 +77664,10 @@ var require_async = __commonJS({ var forever$1 = awaitify(forever, 2); function groupByLimit(coll, limit, iteratee, callback) { var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val2, iterCb) => { - _iteratee(val2, (err, key) => { + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { if (err) return iterCb(err); - return iterCb(err, { key, val: val2 }); + return iterCb(err, { key, val }); }); }, (err, mapResults) => { var result = {}; @@ -74480,11 +77675,11 @@ var require_async = __commonJS({ for (var i = 0; i < mapResults.length; i++) { if (mapResults[i]) { var { key } = mapResults[i]; - var { val: val2 } = mapResults[i]; + var { val } = mapResults[i]; if (hasOwnProperty.call(result, key)) { - result[key].push(val2); + result[key].push(val); } else { - result[key] = [val2]; + result[key] = [val]; } } } @@ -74503,8 +77698,8 @@ var require_async = __commonJS({ callback = once(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); - return eachOfLimit$2(limit)(obj, (val2, key, next) => { - _iteratee(val2, key, (err, result) => { + return eachOfLimit$2(limit)(obj, (val, key, next) => { + _iteratee(val, key, (err, result) => { if (err) return next(err); newObj[key] = result; next(err); @@ -75824,8 +79019,8 @@ var require_graceful_fs = __commonJS({ get: function() { return ReadStream; }, - set: function(val2) { - ReadStream = val2; + set: function(val) { + ReadStream = val; }, enumerable: true, configurable: true @@ -75834,8 +79029,8 @@ var require_graceful_fs = __commonJS({ get: function() { return WriteStream; }, - set: function(val2) { - WriteStream = val2; + set: function(val) { + WriteStream = val; }, enumerable: true, configurable: true @@ -75845,8 +79040,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileReadStream; }, - set: function(val2) { - FileReadStream = val2; + set: function(val) { + FileReadStream = val; }, enumerable: true, configurable: true @@ -75856,8 +79051,8 @@ var require_graceful_fs = __commonJS({ get: function() { return FileWriteStream; }, - set: function(val2) { - FileWriteStream = val2; + set: function(val) { + FileWriteStream = val; }, enumerable: true, configurable: true @@ -76111,7 +79306,7 @@ var require_safe_buffer = __commonJS({ }); // node_modules/core-util-is/lib/util.js -var require_util11 = __commonJS({ +var require_util10 = __commonJS({ "node_modules/core-util-is/lib/util.js"(exports2) { function isArray(arg) { if (Array.isArray) { @@ -76393,7 +79588,7 @@ var require_stream_writable = __commonJS({ var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; var Duplex; Writable.WritableState = WritableState; - var util = Object.create(require_util11()); + var util = Object.create(require_util10()); util.inherits = require_inherits(); var internalUtil = { deprecate: require_node2() @@ -76829,7 +80024,7 @@ var require_stream_duplex = __commonJS({ return keys2; }; module2.exports = Duplex; - var util = Object.create(require_util11()); + var util = Object.create(require_util10()); util.inherits = require_inherits(); var Readable = require_stream_readable(); var Writable = require_stream_writable(); @@ -77154,7 +80349,7 @@ var require_stream_readable = __commonJS({ function _isUint8Array(obj) { return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; } - var util = Object.create(require_util11()); + var util = Object.create(require_util10()); util.inherits = require_inherits(); var debugUtil = require("util"); var debug4 = void 0; @@ -77823,7 +81018,7 @@ var require_stream_transform = __commonJS({ "use strict"; module2.exports = Transform; var Duplex = require_stream_duplex(); - var util = Object.create(require_util11()); + var util = Object.create(require_util10()); util.inherits = require_inherits(); util.inherits(Transform, Duplex); function afterTransform(er, data) { @@ -77923,7 +81118,7 @@ var require_stream_passthrough = __commonJS({ "use strict"; module2.exports = PassThrough; var Transform = require_stream_transform(); - var util = Object.create(require_util11()); + var util = Object.create(require_util10()); util.inherits = require_inherits(); util.inherits(PassThrough, Transform); function PassThrough(options) { @@ -78841,8 +82036,8 @@ var require_primordials = __commonJS({ PromiseReject(err) { return Promise.reject(err); }, - PromiseResolve(val2) { - return Promise.resolve(val2); + PromiseResolve(val) { + return Promise.resolve(val); }, ReflectApply: Reflect.apply, RegExpPrototypeTest(self2, value) { @@ -79547,7 +82742,7 @@ var require_abort_controller = __commonJS({ }); // node_modules/readable-stream/lib/ours/util.js -var require_util12 = __commonJS({ +var require_util11 = __commonJS({ "node_modules/readable-stream/lib/ours/util.js"(exports2, module2) { "use strict"; var bufferModule = require("buffer"); @@ -79738,7 +82933,7 @@ var require_util12 = __commonJS({ var require_errors3 = __commonJS({ "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; - var { format, inspect, AggregateError: CustomAggregateError } = require_util12(); + var { format, inspect, AggregateError: CustomAggregateError } = require_util11(); var AggregateError = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = /* @__PURE__ */ Symbol("kIsNodeError"); var kTypes = [ @@ -79761,14 +82956,14 @@ var require_errors3 = __commonJS({ throw new codes.ERR_INTERNAL_ASSERTION(message); } } - function addNumericalSeparator(val2) { + function addNumericalSeparator(val) { let res = ""; - let i = val2.length; - const start = val2[0] === "-" ? 1 : 0; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; for (; i >= start + 4; i -= 3) { - res = `_${val2.slice(i - 3, i)}${res}`; + res = `_${val.slice(i - 3, i)}${res}`; } - return `${val2.slice(0, i)}${res}`; + return `${val.slice(0, i)}${res}`; } function getMessage(key, msg, args) { if (typeof msg === "function") { @@ -80074,8 +83269,8 @@ var require_validators = __commonJS({ hideStackFrames, codes: { ERR_SOCKET_BAD_PORT, ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_INVALID_ARG_VALUE, ERR_OUT_OF_RANGE, ERR_UNKNOWN_SIGNAL } } = require_errors3(); - var { normalizeEncoding } = require_util12(); - var { isAsyncFunction, isArrayBufferView } = require_util12().types; + var { normalizeEncoding } = require_util11(); + var { isAsyncFunction, isArrayBufferView } = require_util11().types; var signals = {}; function isInt32(value) { return value === (value | 0); @@ -80322,7 +83517,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils6 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -80536,7 +83731,7 @@ var require_end_of_stream = __commonJS({ var process2 = require_process(); var { AbortError, codes } = require_errors3(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once } = require_util12(); + var { kEmptyObject, once } = require_util11(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -80554,7 +83749,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils6(); + } = require_utils7(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -80709,7 +83904,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util12().addAbortListener; + addAbortListener = addAbortListener || require_util11().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -80736,7 +83931,7 @@ var require_end_of_stream = __commonJS({ if (options.signal.aborted) { process2.nextTick(abort); } else { - addAbortListener = addAbortListener || require_util12().addAbortListener; + addAbortListener = addAbortListener || require_util11().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; callback = once((...args) => { @@ -80792,7 +83987,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors3(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils7(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -81130,7 +84325,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors3(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils7(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -81166,7 +84361,7 @@ var require_add_abort_signal = __commonJS({ if (signal.aborted) { onAbort(); } else { - addAbortListener = addAbortListener || require_util12().addAbortListener; + addAbortListener = addAbortListener || require_util11().addAbortListener; const disposable = addAbortListener(signal, onAbort); eos(stream, disposable[SymbolDispose]); } @@ -81181,7 +84376,7 @@ var require_buffer_list = __commonJS({ "use strict"; var { StringPrototypeSlice, SymbolIterator, TypedArrayPrototypeSet, Uint8Array: Uint8Array2 } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); - var { inspect } = require_util12(); + var { inspect } = require_util11(); module2.exports = class BufferList { constructor() { this.head = null; @@ -81492,7 +84687,7 @@ var require_readable3 = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); - var debug4 = require_util12().debuglog("stream", (fn) => { + var debug4 = require_util11().debuglog("stream", (fn) => { debug4 = fn; }); var BufferList = require_buffer_list(); @@ -82237,9 +85432,9 @@ var require_readable3 = __commonJS({ const r = this._readableState; return !!r && r.readable !== false && !r.destroyed && !r.errorEmitted && !r.endEmitted; }, - set(val2) { + set(val) { if (this._readableState) { - this._readableState.readable = !!val2; + this._readableState.readable = !!val; } } }, @@ -82951,9 +86146,9 @@ var require_writable = __commonJS({ const w = this._writableState; return !!w && w.writable !== false && !w.destroyed && !w.errored && !w.ending && !w.ended; }, - set(val2) { + set(val) { if (this._writableState) { - this._writableState.writable = !!val2; + this._writableState.writable = !!val; } } }, @@ -83067,7 +86262,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils6(); + } = require_utils7(); var eos = require_end_of_stream(); var { AbortError, @@ -83077,7 +86272,7 @@ var require_duplexify = __commonJS({ var Duplex = require_duplex(); var Readable = require_readable3(); var Writable = require_writable(); - var { createDeferredPromise } = require_util12(); + var { createDeferredPromise } = require_util11(); var from = require_from(); var Blob2 = globalThis.Blob || bufferModule.Blob; var isBlob = typeof Blob2 !== "undefined" ? function isBlob2(b) { @@ -83150,9 +86345,9 @@ var require_duplexify = __commonJS({ const promise = FunctionPrototypeCall( then2, value, - (val2) => { - if (val2 != null) { - throw new ERR_INVALID_RETURN_VALUE("nully", "body", val2); + (val) => { + if (val != null) { + throw new ERR_INVALID_RETURN_VALUE("nully", "body", val); } }, (err) => { @@ -83206,9 +86401,9 @@ var require_duplexify = __commonJS({ FunctionPrototypeCall( then, body, - (val2) => { - if (val2 != null) { - d.push(val2); + (val) => { + if (val != null) { + d.push(val); } d.push(null); }, @@ -83591,13 +86786,13 @@ var require_transform = __commonJS({ const rState = this._readableState; const wState = this._writableState; const length = rState.length; - this._transform(chunk, encoding, (err, val2) => { + this._transform(chunk, encoding, (err, val) => { if (err) { callback(err); return; } - if (val2 != null) { - this.push(val2); + if (val != null) { + this.push(val); } if (wState.ended || // Backwards compat. length === rState.length || // Backwards compat. @@ -83638,12 +86833,12 @@ var require_passthrough2 = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/pipeline.js -var require_pipeline3 = __commonJS({ +var require_pipeline4 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { var process2 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once } = require_util12(); + var { once } = require_util11(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -83667,7 +86862,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils6(); + } = require_utils7(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -83700,19 +86895,19 @@ var require_pipeline3 = __commonJS({ validateFunction(streams[streams.length - 1], "streams[stream.length - 1]"); return streams.pop(); } - function makeAsyncIterable(val2) { - if (isIterable(val2)) { - return val2; - } else if (isReadableNodeStream(val2)) { - return fromReadable(val2); + function makeAsyncIterable(val) { + if (isIterable(val)) { + return val; + } else if (isReadableNodeStream(val)) { + return fromReadable(val); } - throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val2); + throw new ERR_INVALID_ARG_TYPE2("val", ["Readable", "Iterable", "AsyncIterable"], val); } - async function* fromReadable(val2) { + async function* fromReadable(val) { if (!Readable) { Readable = require_readable3(); } - yield* Readable.prototype[SymbolAsyncIterator].call(val2); + yield* Readable.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { let error3; @@ -83812,7 +87007,7 @@ var require_pipeline3 = __commonJS({ function abort() { finishImpl(new AbortError()); } - addAbortListener = addAbortListener || require_util12().addAbortListener; + addAbortListener = addAbortListener || require_util11().addAbortListener; let disposable; if (outerSignal) { disposable = addAbortListener(outerSignal, abort); @@ -83913,10 +87108,10 @@ var require_pipeline3 = __commonJS({ finishCount++; then.call( ret, - (val2) => { - value = val2; - if (val2 != null) { - pt.write(val2); + (val) => { + value = val; + if (val != null) { + pt.write(val); } if (end) { pt.end(); @@ -84069,7 +87264,7 @@ var require_pipeline3 = __commonJS({ var require_compose = __commonJS({ "node_modules/readable-stream/lib/internal/streams/compose.js"(exports2, module2) { "use strict"; - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var Duplex = require_duplex(); var { destroyer } = require_destroy2(); var { @@ -84080,7 +87275,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils6(); + } = require_utils7(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -84273,8 +87468,8 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils6(); - var { deprecate } = require_util12(); + var { isWritable, isNodeStream } = require_utils7(); + var { deprecate } = require_util11(); var { ArrayPrototypePush, Boolean: Boolean2, @@ -84327,7 +87522,7 @@ var require_operators = __commonJS({ validateInteger(highWaterMark, "options.highWaterMark", 0); highWaterMark += concurrency; return async function* map3() { - const signal = require_util12().AbortSignalAny( + const signal = require_util11().AbortSignalAny( [options === null || options === void 0 ? void 0 : options.signal].filter(Boolean2) ); const stream = this; @@ -84355,7 +87550,7 @@ var require_operators = __commonJS({ } async function pump() { try { - for await (let val2 of stream) { + for await (let val of stream) { if (done) { return; } @@ -84363,17 +87558,17 @@ var require_operators = __commonJS({ throw new AbortError(); } try { - val2 = fn(val2, signalOpt); - if (val2 === kEmpty) { + val = fn(val, signalOpt); + if (val === kEmpty) { continue; } - val2 = PromiseResolve(val2); + val = PromiseResolve(val); } catch (err) { - val2 = PromiseReject(err); + val = PromiseReject(err); } cnt += 1; - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); if (next) { next(); next = null; @@ -84386,9 +87581,9 @@ var require_operators = __commonJS({ } queue.push(kEof); } catch (err) { - const val2 = PromiseReject(err); - PromisePrototypeThen(val2, afterItemProcessed, onCatch); - queue.push(val2); + const val = PromiseReject(err); + PromisePrototypeThen(val, afterItemProcessed, onCatch); + queue.push(val); } finally { done = true; if (next) { @@ -84401,15 +87596,15 @@ var require_operators = __commonJS({ try { while (true) { while (queue.length > 0) { - const val2 = await queue[0]; - if (val2 === kEof) { + const val = await queue[0]; + if (val === kEof) { return; } if (signal.aborted) { throw new AbortError(); } - if (val2 !== kEmpty) { - yield val2; + if (val !== kEmpty) { + yield val; } queue.shift(); maybeResume(); @@ -84436,14 +87631,14 @@ var require_operators = __commonJS({ } return async function* asIndexedPairs2() { let index = 0; - for await (const val2 of this) { + for await (const val of this) { var _options$signal; if (options !== null && options !== void 0 && (_options$signal = options.signal) !== null && _options$signal !== void 0 && _options$signal.aborted) { throw new AbortError({ cause: options.signal.reason }); } - yield [index++, val2]; + yield [index++, val]; } }.call(this); } @@ -84563,22 +87758,22 @@ var require_operators = __commonJS({ validateAbortSignal(options.signal, "options.signal"); } const result = []; - for await (const val2 of this) { + for await (const val of this) { var _options$signal4; if (options !== null && options !== void 0 && (_options$signal4 = options.signal) !== null && _options$signal4 !== void 0 && _options$signal4.aborted) { throw new AbortError(void 0, { cause: options.signal.reason }); } - ArrayPrototypePush(result, val2); + ArrayPrototypePush(result, val); } return result; } function flatMap(fn, options) { const values = map2.call(this, fn, options); return async function* flatMap2() { - for await (const val2 of values) { - yield* val2; + for await (const val of values) { + yield* val; } }.call(this); } @@ -84605,13 +87800,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal5 = options.signal) !== null && _options$signal5 !== void 0 && _options$signal5.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal6; if (options !== null && options !== void 0 && (_options$signal6 = options.signal) !== null && _options$signal6 !== void 0 && _options$signal6.aborted) { throw new AbortError(); } if (number-- <= 0) { - yield val2; + yield val; } } }.call(this); @@ -84629,13 +87824,13 @@ var require_operators = __commonJS({ if (options !== null && options !== void 0 && (_options$signal7 = options.signal) !== null && _options$signal7 !== void 0 && _options$signal7.aborted) { throw new AbortError(); } - for await (const val2 of this) { + for await (const val of this) { var _options$signal8; if (options !== null && options !== void 0 && (_options$signal8 = options.signal) !== null && _options$signal8 !== void 0 && _options$signal8.aborted) { throw new AbortError(); } if (number-- > 0) { - yield val2; + yield val; } if (number <= 0) { return; @@ -84668,8 +87863,8 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils6(); - var { pipelineImpl: pl } = require_pipeline3(); + var { isIterable, isNodeStream, isWebStream } = require_utils7(); + var { pipelineImpl: pl } = require_pipeline4(); var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { @@ -84712,18 +87907,18 @@ var require_stream2 = __commonJS({ var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); var { promisify: { custom: customPromisify } - } = require_util12(); + } = require_util11(); var { streamReturningOperators, promiseReturningOperators } = require_operators(); var { codes: { ERR_ILLEGAL_CONSTRUCTOR } } = require_errors3(); var compose = require_compose(); var { setDefaultHighWaterMark, getDefaultHighWaterMark } = require_state3(); - var { pipeline } = require_pipeline3(); + var { pipeline } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises2 = require_promises(); - var utils = require_utils6(); + var utils = require_utils7(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -85693,7 +88888,7 @@ var require_isPlainObject = __commonJS({ }); // node_modules/@isaacs/balanced-match/dist/commonjs/index.js -var require_commonjs13 = __commonJS({ +var require_commonjs18 = __commonJS({ "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -85755,12 +88950,12 @@ var require_commonjs13 = __commonJS({ }); // node_modules/@isaacs/brace-expansion/dist/commonjs/index.js -var require_commonjs14 = __commonJS({ +var require_commonjs19 = __commonJS({ "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.expand = expand; - var balanced_match_1 = require_commonjs13(); + var balanced_match_1 = require_commonjs18(); var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; @@ -86575,12 +89770,12 @@ var require_escape = __commonJS({ }); // node_modules/glob/node_modules/minimatch/dist/commonjs/index.js -var require_commonjs15 = __commonJS({ +var require_commonjs20 = __commonJS({ "node_modules/glob/node_modules/minimatch/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = require_commonjs14(); + var brace_expansion_1 = require_commonjs19(); var assert_valid_pattern_js_1 = require_assert_valid_pattern(); var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); @@ -87335,7 +90530,7 @@ var require_commonjs15 = __commonJS({ }); // node_modules/lru-cache/dist/commonjs/index.js -var require_commonjs16 = __commonJS({ +var require_commonjs21 = __commonJS({ "node_modules/lru-cache/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -88231,14 +91426,14 @@ var require_commonjs16 = __commonJS({ pop() { try { while (this.#size) { - const val2 = this.#valList[this.#head]; + const val = this.#valList[this.#head]; this.#evict(true); - if (this.#isBackgroundFetch(val2)) { - if (val2.__staleWhileFetching) { - return val2.__staleWhileFetching; + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; } - } else if (val2 !== void 0) { - return val2; + } else if (val !== void 0) { + return val; } } } finally { @@ -88729,10 +91924,10 @@ var require_commonjs16 = __commonJS({ }); // node_modules/minipass/dist/commonjs/index.js -var require_commonjs17 = __commonJS({ +var require_commonjs22 = __commonJS({ "node_modules/minipass/dist/commonjs/index.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -88742,7 +91937,7 @@ var require_commonjs17 = __commonJS({ stderr: null }; var node_events_1 = require("node:events"); - var node_stream_1 = __importDefault4(require("node:stream")); + var node_stream_1 = __importDefault2(require("node:stream")); var node_string_decoder_1 = require("node:string_decoder"); var isStream = (s) => !!s && typeof s === "object" && (s instanceof Minipass || s instanceof node_stream_1.default || (0, exports2.isReadable)(s) || (0, exports2.isWritable)(s)); exports2.isStream = isStream; @@ -89621,10 +92816,10 @@ var require_commonjs17 = __commonJS({ }); // node_modules/path-scurry/dist/commonjs/index.js -var require_commonjs18 = __commonJS({ +var require_commonjs23 = __commonJS({ "node_modules/path-scurry/dist/commonjs/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -89637,30 +92832,30 @@ var require_commonjs18 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PathScurry = exports2.Path = exports2.PathScurryDarwin = exports2.PathScurryPosix = exports2.PathScurryWin32 = exports2.PathScurryBase = exports2.PathPosix = exports2.PathWin32 = exports2.PathBase = exports2.ChildrenCache = exports2.ResolveCache = void 0; - var lru_cache_1 = require_commonjs16(); + var lru_cache_1 = require_commonjs21(); var node_path_1 = require("node:path"); var node_url_1 = require("node:url"); var fs_1 = require("fs"); - var actualFS = __importStar4(require("node:fs")); + var actualFS = __importStar2(require("node:fs")); var realpathSync = fs_1.realpathSync.native; var promises_1 = require("node:fs/promises"); - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var defaultFS = { lstatSync: fs_1.lstatSync, readdir: fs_1.readdir, @@ -91402,7 +94597,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var isPatternList = (pl) => pl.length >= 1; var isGlobList = (gl) => gl.length >= 1; var Pattern = class _Pattern { @@ -91576,7 +94771,7 @@ var require_ignore = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { @@ -91673,7 +94868,7 @@ var require_processor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var HasWalkedCache = class _HasWalkedCache { store; constructor(store = /* @__PURE__ */ new Map()) { @@ -91906,7 +95101,7 @@ var require_walker = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; - var minipass_1 = require_commonjs17(); + var minipass_1 = require_commonjs22(); var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; @@ -92246,9 +95441,9 @@ var require_glob = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Glob = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var node_url_1 = require("node:url"); - var path_scurry_1 = require_commonjs18(); + var path_scurry_1 = require_commonjs23(); var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; @@ -92459,7 +95654,7 @@ var require_has_magic = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hasMagic = void 0; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var hasMagic = (pattern, options = {}) => { if (!Array.isArray(pattern)) { pattern = [pattern]; @@ -92475,7 +95670,7 @@ var require_has_magic = __commonJS({ }); // node_modules/glob/dist/commonjs/index.js -var require_commonjs19 = __commonJS({ +var require_commonjs24 = __commonJS({ "node_modules/glob/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -92485,10 +95680,10 @@ var require_commonjs19 = __commonJS({ exports2.globSync = globSync; exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; - var minimatch_1 = require_commonjs15(); + var minimatch_1 = require_commonjs20(); var glob_js_1 = require_glob(); var has_magic_js_1 = require_has_magic(); - var minimatch_2 = require_commonjs15(); + var minimatch_2 = require_commonjs20(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { return minimatch_2.escape; } }); @@ -92565,7 +95760,7 @@ var require_file3 = __commonJS({ var difference = require_difference(); var union = require_union(); var isPlainObject = require_isPlainObject(); - var glob2 = require_commonjs19(); + var glob2 = require_commonjs24(); var file = module2.exports = {}; var pathSeparatorRe = /[\/\\]/g; var processPatterns = function(patterns, fn) { @@ -92829,7 +96024,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error2 = __commonJS({ +var require_error3 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -92870,7 +96065,7 @@ var require_core2 = __commonJS({ var path2 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error2(); + var ArchiverError = require_error3(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -93413,7 +96608,7 @@ var require_archive_entry = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/util.js -var require_util13 = __commonJS({ +var require_util12 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { var util = module2.exports = {}; util.dateToDos = function(d, forceLocalTime) { @@ -93424,7 +96619,7 @@ var require_util13 = __commonJS({ } else if (year >= 2044) { return 2141175677; } - var val2 = { + var val = { year, month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), date: forceLocalTime ? d.getDate() : d.getUTCDate(), @@ -93432,7 +96627,7 @@ var require_util13 = __commonJS({ minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() }; - return val2.year - 1980 << 25 | val2.month + 1 << 21 | val2.date << 16 | val2.hours << 11 | val2.minutes << 5 | val2.seconds / 2; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; }; util.dosToDate = function(dos) { return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); @@ -93471,7 +96666,7 @@ var require_util13 = __commonJS({ // node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js var require_general_purpose_bit = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { - var zipUtil = require_util13(); + var zipUtil = require_util12(); var DATA_DESCRIPTOR_FLAG = 1 << 3; var ENCRYPTION_FLAG = 1 << 0; var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; @@ -93598,7 +96793,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants8 = __commonJS({ +var require_constants12 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -93682,8 +96877,8 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants8(); - var zipUtil = require_util13(); + var constants = require_constants12(); + var zipUtil = require_util12(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { return new ZipArchiveEntry(name); @@ -93863,7 +97058,7 @@ var require_is_stream2 = __commonJS({ }); // node_modules/compress-commons/lib/util/index.js -var require_util14 = __commonJS({ +var require_util13 = __commonJS({ "node_modules/compress-commons/lib/util/index.js"(exports2, module2) { var Stream = require("stream").Stream; var PassThrough = require_ours().PassThrough; @@ -93891,7 +97086,7 @@ var require_archive_output_stream = __commonJS({ var isStream = require_is_stream2(); var Transform = require_ours().Transform; var ArchiveEntry = require_archive_entry(); - var util = require_util14(); + var util = require_util13(); var ArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ArchiveOutputStream)) { return new ArchiveOutputStream(options); @@ -94154,7 +97349,7 @@ var require_deflate_crc32_stream = __commonJS({ }); // node_modules/crc32-stream/lib/index.js -var require_lib4 = __commonJS({ +var require_lib3 = __commonJS({ "node_modules/crc32-stream/lib/index.js"(exports2, module2) { "use strict"; module2.exports = { @@ -94169,14 +97364,14 @@ var require_zip_archive_output_stream = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { var inherits = require("util").inherits; var crc32 = require_crc32(); - var { CRC32Stream } = require_lib4(); - var { DeflateCRC32Stream } = require_lib4(); + var { CRC32Stream } = require_lib3(); + var { DeflateCRC32Stream } = require_lib3(); var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants8(); - var util = require_util14(); - var zipUtil = require_util13(); + var constants = require_constants12(); + var util = require_util13(); + var zipUtil = require_util12(); var ZipArchiveOutputStream = module2.exports = function(options) { if (!(this instanceof ZipArchiveOutputStream)) { return new ZipArchiveOutputStream(options); @@ -94674,29 +97869,29 @@ var require_fast_fifo = __commonJS({ this.head.clear(); this.length = 0; } - push(val2) { + push(val) { this.length++; - if (!this.head.push(val2)) { + if (!this.head.push(val)) { const prev = this.head; this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length); - this.head.push(val2); + this.head.push(val); } } shift() { if (this.length !== 0) this.length--; - const val2 = this.tail.shift(); - if (val2 === void 0 && this.tail.next) { + const val = this.tail.shift(); + if (val === void 0 && this.tail.next) { const next = this.tail.next; this.tail.next = null; this.tail = next; return this.tail.shift(); } - return val2; + return val; } peek() { - const val2 = this.tail.peek(); - if (val2 === void 0 && this.tail.next) return this.tail.next.peek(); - return val2; + const val = this.tail.peek(); + if (val === void 0 && this.tail.next) return this.tail.next.peek(); + return val; } isEmpty() { return this.length === 0; @@ -96174,10 +99369,10 @@ var require_headers2 = __commonJS({ for (let j = 156; j < 512; j++) sum += block[j]; return sum; } - function encodeOct(val2, n) { - val2 = val2.toString(8); - if (val2.length > n) return SEVENS.slice(0, n) + " "; - return ZEROS.slice(0, n - val2.length) + val2 + " "; + function encodeOct(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + return ZEROS.slice(0, n - val.length) + val + " "; } function encodeSizeBin(num, buf, off) { buf[off] = 128; @@ -96212,21 +99407,21 @@ var require_headers2 = __commonJS({ } return positive ? sum : -1 * sum; } - function decodeOct(val2, offset, length) { - val2 = val2.subarray(offset, offset + length); + function decodeOct(val, offset, length) { + val = val.subarray(offset, offset + length); offset = 0; - if (val2[offset] & 128) { - return parse256(val2); + if (val[offset] & 128) { + return parse256(val); } else { - while (offset < val2.length && val2[offset] === 32) offset++; - const end = clamp(indexOf(val2, 32, offset, val2.length), val2.length, val2.length); - while (offset < end && val2[offset] === 0) offset++; + while (offset < val.length && val[offset] === 32) offset++; + const end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; if (end === offset) return 0; - return parseInt(b4a.toString(val2.subarray(offset, end)), 8); + return parseInt(b4a.toString(val.subarray(offset, end)), 8); } } - function decodeStr(val2, offset, length, encoding) { - return b4a.toString(val2.subarray(offset, indexOf(val2, 0, offset, offset + length)), encoding); + function decodeStr(val, offset, length, encoding) { + return b4a.toString(val.subarray(offset, indexOf(val, 0, offset, offset + length)), encoding); } function addLength(str2) { const len = b4a.byteLength(str2); @@ -96572,7 +99767,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants9 = __commonJS({ +var require_constants13 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -96596,7 +99791,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants9(); + var constants = require_constants13(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -96912,7 +100107,7 @@ var require_tar = __commonJS({ }); // node_modules/buffer-crc32/dist/index.cjs -var require_dist8 = __commonJS({ +var require_dist4 = __commonJS({ "node_modules/buffer-crc32/dist/index.cjs"(exports2, module2) { "use strict"; function getDefaultExportFromCjs(x) { @@ -97224,7 +100419,7 @@ var require_json = __commonJS({ "node_modules/archiver/lib/plugins/json.js"(exports2, module2) { var inherits = require("util").inherits; var Transform = require_ours().Transform; - var crc32 = require_dist8(); + var crc32 = require_dist4(); var util = require_archiver_utils(); var Json = function(options) { if (!(this instanceof Json)) { @@ -97320,7 +100515,7 @@ var require_archiver = __commonJS({ var require_zip2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/zip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -97333,31 +100528,31 @@ var require_zip2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -97387,10 +100582,10 @@ var require_zip2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ZipUploadStream = exports2.DEFAULT_COMPRESSION_LEVEL = void 0; exports2.createZipUploadStream = createZipUploadStream; - var stream = __importStar4(require("stream")); + var stream = __importStar2(require("stream")); var promises_1 = require("fs/promises"); - var archiver2 = __importStar4(require_archiver()); - var core14 = __importStar4(require_core()); + var archiver2 = __importStar2(require_archiver()); + var core14 = __importStar2(require_core()); var config_1 = require_config(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -97406,7 +100601,7 @@ var require_zip2 = __commonJS({ }; exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification_1) { - return __awaiter4(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { + return __awaiter2(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), @@ -97465,7 +100660,7 @@ var require_zip2 = __commonJS({ var require_upload_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -97478,31 +100673,31 @@ var require_upload_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -97531,7 +100726,7 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = uploadArtifact; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -97542,7 +100737,7 @@ var require_upload_artifact = __commonJS({ var generated_1 = require_generated(); var errors_1 = require_errors2(); function uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, path_and_artifact_name_validation_1.validateArtifactName)(name); (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory); const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory); @@ -98514,18 +101709,18 @@ var require_binary = __commonJS({ return acc; } function decodeBEs(bytes) { - var val2 = decodeBEu(bytes); + var val = decodeBEu(bytes); if ((bytes[0] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function decodeLEs(bytes) { - var val2 = decodeLEu(bytes); + var val = decodeLEu(bytes); if ((bytes[bytes.length - 1] & 128) == 128) { - val2 -= Math.pow(256, bytes.length); + val -= Math.pow(256, bytes.length); } - return val2; + return val; } function words(decode) { var self2 = {}; @@ -99474,7 +102669,7 @@ var require_unzip = __commonJS({ var require_download_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/download/download-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -99487,31 +102682,31 @@ var require_download_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -99538,20 +102733,20 @@ var require_download_artifact = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.streamExtractExternal = streamExtractExternal; exports2.downloadArtifactPublic = downloadArtifactPublic; exports2.downloadArtifactInternal = downloadArtifactInternal; - var promises_1 = __importDefault4(require("fs/promises")); - var crypto = __importStar4(require("crypto")); - var stream = __importStar4(require("stream")); - var github2 = __importStar4(require_github()); - var core14 = __importStar4(require_core()); - var httpClient = __importStar4(require_lib3()); - var unzip_stream_1 = __importDefault4(require_unzip()); + var promises_1 = __importDefault2(require("fs/promises")); + var crypto2 = __importStar2(require("crypto")); + var stream = __importStar2(require("stream")); + var github2 = __importStar2(require_github()); + var core14 = __importStar2(require_core()); + var httpClient = __importStar2(require_lib()); + var unzip_stream_1 = __importDefault2(require_unzip()); var user_agent_1 = require_user_agent(); var config_1 = require_config(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -99564,7 +102759,7 @@ var require_download_artifact = __commonJS({ return parsed.toString(); }; function exists(path2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { yield promises_1.default.access(path2); return true; @@ -99578,7 +102773,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtract(url, directory) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { @@ -99593,7 +102788,7 @@ var require_download_artifact = __commonJS({ }); } function streamExtractExternal(url_1, directory_1) { - return __awaiter4(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { + return __awaiter2(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1e3 }) { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); const response = yield client.get(url); if (response.message.statusCode !== 200) { @@ -99607,7 +102802,7 @@ var require_download_artifact = __commonJS({ reject(timeoutError); }; const timer = setTimeout(timerFn, opts.timeout); - const hashStream = crypto.createHash("sha256").setEncoding("hex"); + const hashStream = crypto2.createHash("sha256").setEncoding("hex"); const passThrough = new stream.PassThrough(); response.message.pipe(passThrough); passThrough.pipe(hashStream); @@ -99633,7 +102828,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; @@ -99673,7 +102868,7 @@ var require_download_artifact = __commonJS({ }); } function downloadArtifactInternal(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); let digestMismatch = false; @@ -99716,7 +102911,7 @@ Are you trying to download from a different run? Try specifying a github-token w }); } function resolveOrCreateDirectory() { - return __awaiter4(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { + return __awaiter2(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { if (!(yield exists(downloadPath))) { core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); @@ -99733,7 +102928,7 @@ Are you trying to download from a different run? Try specifying a github-token w var require_retry_options = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/retry-options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -99746,33 +102941,33 @@ var require_retry_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = getRetryOptions; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -99885,7 +103080,7 @@ var require_dist_node17 = __commonJS({ var require_get_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/get-artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -99898,31 +103093,31 @@ var require_get_artifact = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { var ar = []; for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; return ar; }; - return ownKeys(o); + return ownKeys2(o); }; return function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -99954,7 +103149,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = getArtifactInternal; var github_1 = require_github(); var plugin_retry_1 = require_dist_node17(); - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core()); var utils_1 = require_utils4(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node16(); @@ -99964,7 +103159,7 @@ var require_get_artifact = __commonJS({ var generated_1 = require_generated(); var errors_1 = require_errors2(); function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -100006,7 +103201,7 @@ var require_get_artifact = __commonJS({ }); } function getArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); @@ -100044,7 +103239,7 @@ var require_get_artifact = __commonJS({ var require_delete_artifact = __commonJS({ "node_modules/@actions/artifact/lib/internal/delete/delete-artifact.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -100087,7 +103282,7 @@ var require_delete_artifact = __commonJS({ var get_artifact_1 = require_get_artifact(); var errors_1 = require_errors2(); function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { var _a; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); const opts = { @@ -100113,7 +103308,7 @@ var require_delete_artifact = __commonJS({ }); } function deleteArtifactInternal(artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const listReq = { @@ -100149,7 +103344,7 @@ var require_delete_artifact = __commonJS({ var require_list_artifacts = __commonJS({ "node_modules/@actions/artifact/lib/internal/find/list-artifacts.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -100194,7 +103389,7 @@ var require_list_artifacts = __commonJS({ var paginationCount = 100; var maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount); function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) { - return __awaiter4(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { + return __awaiter2(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { (0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); let artifacts = []; const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults); @@ -100259,7 +103454,7 @@ var require_list_artifacts = __commonJS({ }); } function listArtifactsInternal() { - return __awaiter4(this, arguments, void 0, function* (latest = false) { + return __awaiter2(this, arguments, void 0, function* (latest = false) { const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)(); const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)(); const req = { @@ -100305,7 +103500,7 @@ var require_list_artifacts = __commonJS({ var require_client2 = __commonJS({ "node_modules/@actions/artifact/lib/internal/client.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -100332,7 +103527,7 @@ var require_client2 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __rest4 = exports2 && exports2.__rest || function(s, e) { + var __rest2 = exports2 && exports2.__rest || function(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; @@ -100355,7 +103550,7 @@ var require_client2 = __commonJS({ var errors_1 = require_errors2(); var DefaultArtifactClient2 = class { uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -100372,13 +103567,13 @@ If the error persists, please check whether Actions is operating normally at [ht }); } downloadArtifact(artifactId, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); } if (options === null || options === void 0 ? void 0 : options.findBy) { - const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest4(options, ["findBy"]); + const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest2(options, ["findBy"]); return (0, download_artifact_1.downloadArtifactPublic)(artifactId, repositoryOwner, repositoryName, token, downloadOptions); } return (0, download_artifact_1.downloadArtifactInternal)(artifactId, options); @@ -100393,7 +103588,7 @@ If the error persists, please check whether Actions and API requests are operati }); } listArtifacts(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -100414,7 +103609,7 @@ If the error persists, please check whether Actions and API requests are operati }); } getArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -100435,7 +103630,7 @@ If the error persists, please check whether Actions and API requests are operati }); } deleteArtifact(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { if ((0, config_1.isGhes)()) { throw new errors_1.GHESNotSupportedError(); @@ -100472,7 +103667,7 @@ var require_interfaces2 = __commonJS({ var require_artifact2 = __commonJS({ "node_modules/@actions/artifact/lib/artifact.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -100485,26 +103680,2815 @@ var require_artifact2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); var client_1 = require_client2(); - __exportStar4(require_interfaces2(), exports2); - __exportStar4(require_errors2(), exports2); - __exportStar4(require_client2(), exports2); + __exportStar2(require_interfaces2(), exports2); + __exportStar2(require_errors2(), exports2); + __exportStar2(require_client2(), exports2); var client = new client_1.DefaultArtifactClient(); exports2.default = client; } }); +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js +var require_lib4 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/artifact-legacy/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils8(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + // node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js var require_path_and_artifact_name_validation2 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/path-and-artifact-name-validation.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.checkArtifactFilePath = exports2.checkArtifactName = void 0; - var core_1 = require_core(); + var core_1 = require_core3(); var invalidArtifactFilePathCharacters = /* @__PURE__ */ new Map([ ['"', ' Double quote "'], [":", " Colon :"], @@ -100560,7 +106544,7 @@ The following characters are not allowed in files that are uploaded due to limit var require_upload_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -100573,24 +106557,24 @@ var require_upload_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs2 = __importStar4(require("fs")); - var core_1 = require_core(); + var fs2 = __importStar2(require("fs")); + var core_1 = require_core3(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { @@ -100635,7 +106619,7 @@ var require_tmp = __commonJS({ var fs2 = require("fs"); var os = require("os"); var path2 = require("path"); - var crypto = require("crypto"); + var crypto2 = require("crypto"); var _c = { fs: fs2.constants, os: os.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; @@ -100815,9 +106799,9 @@ var require_tmp = __commonJS({ function _randomChars(howMany) { let value = [], rnd = null; try { - rnd = crypto.randomBytes(howMany); + rnd = crypto2.randomBytes(howMany); } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); + rnd = crypto2.pseudoRandomBytes(howMany); } for (let i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); @@ -101032,811 +107016,6 @@ var require_tmp_promise = __commonJS({ } }); -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js -var require_proxy4 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js -var require_lib5 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js -var require_auth3 = __commonJS({ - "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - // node_modules/@actions/artifact-legacy/lib/internal/config-variables.js var require_config_variables = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/config-variables.js"(exports2) { @@ -102209,10 +107388,10 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils7 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -102239,18 +107418,18 @@ var require_utils7 = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.digestForStream = exports2.sleep = exports2.getProperRetention = exports2.rmFile = exports2.getFileSize = exports2.createEmptyFilesForArtifact = exports2.createDirectoriesForArtifact = exports2.displayHttpDiagnostics = exports2.getArtifactUrl = exports2.createHttpClient = exports2.getUploadHeaders = exports2.getDownloadHeaders = exports2.getContentRange = exports2.tryGetRetryAfterValueTimeInMilliseconds = exports2.isThrottledStatusCode = exports2.isRetryableStatusCode = exports2.isForbiddenStatusCode = exports2.isSuccessStatusCode = exports2.getApiVersion = exports2.parseEnvNumber = exports2.getExponentialRetryTimeInMilliseconds = void 0; - var crypto_1 = __importDefault4(require("crypto")); + var crypto_1 = __importDefault2(require("crypto")); var fs_1 = require("fs"); - var core_1 = require_core(); - var http_client_1 = require_lib5(); - var auth_1 = require_auth3(); + var core_1 = require_core3(); + var http_client_1 = require_lib4(); + var auth_1 = require_auth2(); var config_variables_1 = require_config_variables(); - var crc64_1 = __importDefault4(require_crc64()); + var crc64_1 = __importDefault2(require_crc64()); function getExponentialRetryTimeInMilliseconds(retryCount) { if (retryCount < 0) { throw new Error("RetryCount should not be negative"); @@ -102396,7 +107575,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.displayHttpDiagnostics = displayHttpDiagnostics; function createDirectoriesForArtifact(directories) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const directory of directories) { yield fs_1.promises.mkdir(directory, { recursive: true @@ -102406,7 +107585,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createDirectoriesForArtifact = createDirectoriesForArtifact; function createEmptyFilesForArtifact(emptyFilesToCreate) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const filePath of emptyFilesToCreate) { yield (yield fs_1.promises.open(filePath, "w")).close(); } @@ -102414,7 +107593,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.createEmptyFilesForArtifact = createEmptyFilesForArtifact; function getFileSize(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const stats = yield fs_1.promises.stat(filePath); (0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`); return stats.size; @@ -102422,7 +107601,7 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getFileSize = getFileSize; function rmFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield fs_1.promises.unlink(filePath); }); } @@ -102443,13 +107622,13 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} } exports2.getProperRetention = getProperRetention; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { const crc64 = new crc64_1.default(); const md5 = crypto_1.default.createHash("md5"); @@ -102473,7 +107652,7 @@ var require_status_reporter = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StatusReporter = void 0; - var core_1 = require_core(); + var core_1 = require_core3(); var StatusReporter = class { constructor(displayFrequencyInMilliseconds) { this.totalNumberOfFilesToProcess = 0; @@ -102519,7 +107698,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils7(); + var utils_1 = require_utils9(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -102551,7 +107730,7 @@ var require_http_manager = __commonJS({ var require_upload_gzip = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-gzip.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -102564,21 +107743,21 @@ var require_upload_gzip = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -102605,7 +107784,7 @@ var require_upload_gzip = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -102626,8 +107805,8 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs2 = __importStar4(require("fs")); - var zlib = __importStar4(require("zlib")); + var fs2 = __importStar2(require("fs")); + var zlib = __importStar2(require("zlib")); var util_1 = require("util"); var stat = (0, util_1.promisify)(fs2.stat); var gzipExemptFileExtensions = [ @@ -102655,7 +107834,7 @@ var require_upload_gzip = __commonJS({ // 7ZIP ]; function createGZipFileOnDisk(originalFilePath, tempFilePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const gzipExemptExtension of gzipExemptFileExtensions) { if (originalFilePath.endsWith(gzipExemptExtension)) { return Number.MAX_SAFE_INTEGER; @@ -102666,7 +107845,7 @@ var require_upload_gzip = __commonJS({ const gzip = zlib.createGzip(); const outputStream = fs2.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); - outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { + outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; resolve2(size); })); @@ -102679,15 +107858,15 @@ var require_upload_gzip = __commonJS({ } exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; const inputStream = fs2.createReadStream(originalFilePath); const gzip = zlib.createGzip(); inputStream.pipe(gzip); const chunks = []; try { - for (var _d = true, gzip_1 = __asyncValues4(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { + for (var _d = true, gzip_1 = __asyncValues2(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a; ) { _c = gzip_1_1.value; _d = false; try { @@ -102718,7 +107897,7 @@ var require_upload_gzip = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -102731,21 +107910,21 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -102774,11 +107953,11 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils7(); - var core14 = __importStar4(require_core()); + var utils_1 = require_utils9(); + var core14 = __importStar2(require_core3()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let response = void 0; let statusCode = void 0; let isRetryable = false; @@ -102823,7 +108002,7 @@ var require_requestUtils = __commonJS({ } exports2.retry = retry3; function retryHttpClientRequest(name, method, customErrorMessages = /* @__PURE__ */ new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield retry3(name, method, customErrorMessages, maxAttempts); }); } @@ -102835,7 +108014,7 @@ var require_requestUtils = __commonJS({ var require_upload_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/upload-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -102848,21 +108027,21 @@ var require_upload_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -102891,17 +108070,17 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs2 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var tmp = __importStar4(require_tmp_promise()); - var stream = __importStar4(require("stream")); - var utils_1 = require_utils7(); + var fs2 = __importStar2(require("fs")); + var core14 = __importStar2(require_core3()); + var tmp = __importStar2(require_tmp_promise()); + var stream = __importStar2(require("stream")); + var utils_1 = require_utils9(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); var perf_hooks_1 = require("perf_hooks"); var status_reporter_1 = require_status_reporter(); - var http_client_1 = require_lib5(); + var http_client_1 = require_lib4(); var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils(); @@ -102917,7 +108096,7 @@ var require_upload_http_client = __commonJS({ * @returns The response from the Artifact Service if the file container was successfully created */ createArtifactInFileContainer(artifactName, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const parameters = { Type: "actions_storage", Name: artifactName @@ -102940,7 +108119,7 @@ var require_upload_http_client = __commonJS({ `The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Create Artifact Container", () => __awaiter2(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages); const body = yield response.readBody(); @@ -102954,7 +108133,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of all the files uploaded in bytes */ uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); @@ -102984,7 +108163,7 @@ var require_upload_http_client = __commonJS({ let abortPendingFileUploads = false; this.statusReporter.setTotalNumberOfFilesToProcess(filesToUpload.length); this.statusReporter.start(); - yield Promise.all(parallelUploads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < filesToUpload.length) { const currentFileParameters = parameters[currentFile]; currentFile += 1; @@ -103027,7 +108206,7 @@ var require_upload_http_client = __commonJS({ * @returns The size of the file that was uploaded in bytes along with any failed uploads */ uploadFileAsync(httpClientIndex, parameters) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileStat = yield stat(parameters.file); const totalFileSize = fileStat.size; const isFIFO = fileStat.isFIFO(); @@ -103128,10 +108307,10 @@ var require_upload_http_client = __commonJS({ * @returns if the chunk was successfully uploaded */ uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const digest = yield (0, utils_1.digestForStream)(openStream()); const headers = (0, utils_1.getUploadHeaders)("application/octet-stream", true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest); - const uploadChunkRequest = () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.uploadHttpManager.getClient(httpClientIndex); return yield client.sendStream("PUT", resourceUrl, openStream(), headers); }); @@ -103148,7 +108327,7 @@ var require_upload_http_client = __commonJS({ } return false; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); @@ -103197,7 +108376,7 @@ var require_upload_http_client = __commonJS({ * Updating the size indicates that we are done uploading all the contents of the artifact */ patchArtifactSize(size, artifactName) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)()); resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; @@ -103211,7 +108390,7 @@ var require_upload_http_client = __commonJS({ `An Artifact with the name ${artifactName} was not found` ] ]); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Finalize artifact upload", () => __awaiter2(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); @@ -103227,7 +108406,7 @@ var require_upload_http_client = __commonJS({ var require_download_http_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-http-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -103240,21 +108419,21 @@ var require_download_http_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -103283,10 +108462,10 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs2 = __importStar4(require("fs")); - var core14 = __importStar4(require_core()); - var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils7(); + var fs2 = __importStar2(require("fs")); + var core14 = __importStar2(require_core3()); + var zlib = __importStar2(require("zlib")); + var utils_1 = require_utils9(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -103302,11 +108481,11 @@ var require_download_http_client = __commonJS({ * Gets a list of all artifacts that are in a specific container */ listArtifacts() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const artifactUrl = (0, utils_1.getArtifactUrl)(); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("List Artifacts", () => __awaiter2(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); })); const body = yield response.readBody(); @@ -103319,12 +108498,12 @@ var require_download_http_client = __commonJS({ * @param containerUrl the artifact container URL for the run */ getContainerItems(artifactName, containerUrl) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resourceUrl = new url_1.URL(containerUrl); resourceUrl.searchParams.append("itemPath", artifactName); const client = this.downloadHttpManager.getClient(0); const headers = (0, utils_1.getDownloadHeaders)("application/json"); - const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryHttpClientRequest)("Get Container Items", () => __awaiter2(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); })); const body = yield response.readBody(); @@ -103336,7 +108515,7 @@ var require_download_http_client = __commonJS({ * @param downloadItems information about what items to download and where to save them */ downloadSingleArtifact(downloadItems) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; @@ -103345,7 +108524,7 @@ var require_download_http_client = __commonJS({ core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); - yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelDownloads.map((index) => __awaiter2(this, void 0, void 0, function* () { while (currentFile < downloadItems.length) { const currentFileToDownload = downloadItems[currentFile]; currentFile += 1; @@ -103371,19 +108550,19 @@ var require_download_http_client = __commonJS({ * @param downloadPath destination location for the file being downloaded */ downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); let destinationStream = fs2.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); - const makeDownloadRequest = () => __awaiter4(this, void 0, void 0, function* () { + const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); return yield client.get(artifactLocation, headers); }); const isGzip = (incomingHeaders) => { return "content-encoding" in incomingHeaders && incomingHeaders["content-encoding"] === "gzip"; }; - const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { + const backOff = (retryAfterValue) => __awaiter2(this, void 0, void 0, function* () { retryCount++; if (retryCount > retryLimit) { return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${artifactLocation}`)); @@ -103407,7 +108586,7 @@ var require_download_http_client = __commonJS({ } return parseInt(expected) === received; }; - const resetDestinationStream = (fileDownloadPath) => __awaiter4(this, void 0, void 0, function* () { + const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); yield new Promise((resolve2) => { destinationStream.on("close", resolve2); @@ -103460,7 +108639,7 @@ var require_download_http_client = __commonJS({ * @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it */ pipeResponseToFile(response, destinationStream, isGzip) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { yield new Promise((resolve2, reject) => { if (isGzip) { const gunzip = zlib.createGunzip(); @@ -103504,7 +108683,7 @@ var require_download_http_client = __commonJS({ var require_download_specification = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/download-specification.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -103517,23 +108696,23 @@ var require_download_specification = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path2 = __importStar4(require("path")); + var path2 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { @@ -103570,7 +108749,7 @@ var require_download_specification = __commonJS({ var require_artifact_client = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/artifact-client.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -103583,21 +108762,21 @@ var require_artifact_client = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -103626,10 +108805,10 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core3()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils7(); + var utils_1 = require_utils9(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -103646,7 +108825,7 @@ var require_artifact_client = __commonJS({ * Uploads an artifact */ uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); @@ -103690,7 +108869,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadArtifact(name, path2, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { @@ -103724,7 +108903,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }); } downloadAllArtifacts(path2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); @@ -104092,8 +109271,8 @@ var require_helpers3 = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -104835,7 +110014,7 @@ var require_scan = __commonJS({ }); // node_modules/jsonschema/lib/validator.js -var require_validator2 = __commonJS({ +var require_validator = __commonJS({ "node_modules/jsonschema/lib/validator.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -105058,10 +110237,10 @@ var require_validator2 = __commonJS({ }); // node_modules/jsonschema/lib/index.js -var require_lib6 = __commonJS({ +var require_lib5 = __commonJS({ "node_modules/jsonschema/lib/index.js"(exports2, module2) { "use strict"; - var Validator2 = module2.exports.Validator = require_validator2(); + var Validator2 = module2.exports.Validator = require_validator(); module2.exports.ValidatorResult = require_helpers3().ValidatorResult; module2.exports.ValidatorResultError = require_helpers3().ValidatorResultError; module2.exports.ValidationError = require_helpers3().ValidationError; @@ -105075,11 +110254,1440 @@ var require_lib6 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils10 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils10(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve2(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve2(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info7 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info7, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info7, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info7, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info7, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve2(res); + } + } + this.requestRawWithCallback(info7, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info7, data, onResult) { + if (typeof data === "string") { + if (!info7.options.headers) { + info7.options.headers = {}; + } + info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info7.httpModule.request(info7.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info7.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info7 = {}; + info7.parsedUrl = requestUrl; + const usingSsl = info7.parsedUrl.protocol === "https:"; + info7.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info7.options = {}; + info7.options.host = info7.parsedUrl.hostname; + info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; + info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); + info7.options.method = method; + info7.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info7.options.headers["user-agent"] = this.userAgent; + } + info7.options.agent = this._getAgent(info7.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info7.options); + } + } + return info7; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve2(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve2(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib6(); + var auth_1 = require_auth3(); + var core_1 = require_core4(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -105088,28 +111696,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core4 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils10(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core4()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -105120,10 +113094,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -105131,40 +113113,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); @@ -105179,15 +113165,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -105202,11 +113188,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path2.sep; @@ -105215,7 +113201,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -105224,7 +113210,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -105262,9 +113248,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -105274,40 +113260,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -106096,41 +114086,45 @@ var require_minimatch2 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -106140,7 +114134,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path2.sep); @@ -106156,17 +114150,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -106193,42 +114187,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch2(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -106241,9 +114239,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -106310,17 +114308,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { homedir = homedir || os.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -106394,9 +114392,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -106410,34 +114408,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -106464,7 +114466,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -106483,10 +114485,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -106507,7 +114509,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -106521,11 +114523,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core4()); + var fs2 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path2 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -106540,19 +114542,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -106561,7 +114565,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -106574,7 +114578,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs2.promises.lstat(searchPath)); + yield __await2(fs2.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -106591,24 +114595,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -106617,7 +114624,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -106636,7 +114643,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -106673,11 +114680,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core4()); + var fs2 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path2 = __importStar2(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs2.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream.pipeline); + yield pipeline(fs2.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob2 = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -106705,435 +114852,26 @@ var require_glob2 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create3; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create3(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles2; } }); @@ -108294,7 +116032,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants10 = __commonJS({ +var require_constants14 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -108330,7 +116068,7 @@ var require_constants10 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -108343,21 +116081,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -108384,7 +116132,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -108404,20 +116152,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); - var constants_1 = require_constants10(); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob2 = __importStar2(require_glob2()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); + var constants_1 = require_constants14(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -108433,27 +116190,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path2.join(baseLocation, "actions", "temp"); } - const dest = path2.join(tempDirectory, crypto.randomUUID()); + const dest = path2.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs2.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob2.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -108477,15 +116232,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs2.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -108507,7 +116260,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -108518,13 +116271,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs2.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -108532,14 +116283,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -108549,9 +116298,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -108559,812 +116307,6 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib7 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth4 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } }); @@ -109449,7 +116391,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109462,21 +116404,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -109504,9 +116456,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs17(); var errors_1 = require_errors4(); var UploadProgress = class { constructor(contentLength) { @@ -109589,15 +116542,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -109616,7 +116571,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -109624,7 +116578,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils2 = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109637,21 +116591,31 @@ var require_requestUtils2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -109679,24 +116643,27 @@ var require_requestUtils2 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib7(); - var constants_1 = require_constants10(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var constants_1 = require_constants14(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -109708,14 +116675,13 @@ var require_requestUtils2 = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -109752,9 +116718,8 @@ var require_requestUtils2 = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -109778,13 +116743,155 @@ var require_requestUtils2 = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist5 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -109792,7 +116899,7 @@ var require_requestUtils2 = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -109805,21 +116912,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -109847,20 +116964,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib7(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs2 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs17(); + var buffer = __importStar2(require("buffer")); + var fs2 = __importStar2(require("fs")); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); + var constants_1 = require_constants14(); var requestUtils_1 = require_requestUtils2(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream.pipeline); yield pipeline(response.message, output); }); @@ -109962,10 +117082,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs2.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -109985,17 +117105,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs2.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -110012,7 +117131,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -110025,7 +117144,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -110049,9 +117168,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -110072,8 +117190,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -110089,8 +117207,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -110134,8 +117252,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve2) => { timeoutHandle = setTimeout(() => resolve2("timeout"), timeoutMs); @@ -110152,7 +117269,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -110165,23 +117282,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -110206,7 +117334,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -110248,7 +117375,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -110257,7 +117383,9 @@ var require_config2 = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -110266,13 +117394,11 @@ var require_config2 = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -110284,7 +117410,6 @@ var require_config2 = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -110293,7 +117418,7 @@ var require_package3 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -110330,22 +117455,26 @@ var require_package3 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -110356,12 +117485,11 @@ var require_user_agent2 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package3(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -110369,7 +117497,7 @@ var require_user_agent2 = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -110382,21 +117510,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -110424,13 +117562,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib7(); - var auth_1 = require_auth4(); - var fs2 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs2 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -110463,11 +117604,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -110490,11 +117631,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -110511,7 +117651,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -110527,9 +117667,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -110537,24 +117676,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -110563,7 +117701,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs2.openSync(archivePath, "r"); @@ -110574,7 +117712,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -110597,15 +117735,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache4(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -110627,7 +117765,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache4; } }); @@ -110779,7 +117916,7 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -111264,7 +118401,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -111332,11 +118469,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util15 = __commonJS({ +var require_util14 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url) { if (!url) @@ -111352,7 +118490,6 @@ var require_util15 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -111365,7 +118502,6 @@ var require_util15 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -111373,7 +118509,7 @@ var require_util15 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111401,16 +118537,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent2(); var errors_1 = require_errors4(); var config_1 = require_config2(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth4(); - var http_client_1 = require_lib7(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util15(); + var util_1 = require_util14(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -111434,14 +118570,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; (0, core_1.debug)(`[Request] ${method} ${url}`); const headers = { "Content-Type": contentType }; try { - const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); })); return body; @@ -111451,7 +118587,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -111522,7 +118658,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); }); } @@ -111542,7 +118678,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -111550,7 +118685,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar2 = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111563,21 +118698,31 @@ var require_tar2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111605,16 +118750,18 @@ var require_tar2 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var constants_1 = require_constants14(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -111646,8 +118793,8 @@ var require_tar2 = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -111677,8 +118824,8 @@ var require_tar2 = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -111700,7 +118847,7 @@ var require_tar2 = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -111724,7 +118871,7 @@ var require_tar2 = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -111749,7 +118896,7 @@ var require_tar2 = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -111763,37 +118910,34 @@ var require_tar2 = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -111806,21 +118950,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -111848,15 +119002,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path2 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; + var core14 = __importStar2(require_core()); + var path2 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config2(); var tar_1 = require_tar2(); - var http_client_1 = require_lib7(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -111905,9 +119062,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -111920,9 +119076,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache4; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -111979,8 +119134,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -112051,8 +119206,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache4(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache4(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -112066,10 +119221,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache4; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -112130,8 +119284,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -112217,432 +119371,43 @@ var require_cache3 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils11 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar4(require("fs")); - var path2 = __importStar4(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path2 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path2.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path2.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path2.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112655,130 +119420,142 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os = __importStar2(require("os")); + var utils_1 = require_utils11(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os = require("os"); - var cp = require("child_process"); - var fs2 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var os = __importStar2(require("os")); + var utils_1 = require_utils11(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs2.existsSync(lsbReleaseFile)) { - contents = fs2.readFileSync(lsbReleaseFile).toString(); - } else if (fs2.existsSync(osReleaseFile)) { - contents = fs2.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); // node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy6 = __commonJS({ +var require_proxy5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -112860,10 +119637,10 @@ var require_proxy6 = __commonJS({ }); // node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js -var require_lib8 = __commonJS({ +var require_lib7 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -112876,21 +119653,21 @@ var require_lib8 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -112919,10 +119696,10 @@ var require_lib8 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy6()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy5()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -112997,8 +119774,8 @@ var require_lib8 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -113010,8 +119787,8 @@ var require_lib8 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -113068,42 +119845,42 @@ var require_lib8 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } @@ -113112,14 +119889,14 @@ var require_lib8 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113128,7 +119905,7 @@ var require_lib8 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113137,7 +119914,7 @@ var require_lib8 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -113151,7 +119928,7 @@ var require_lib8 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -113225,7 +120002,7 @@ var require_lib8 = __commonJS({ * @param data */ requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { @@ -113412,15 +120189,15 @@ var require_lib8 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -113478,11 +120255,507 @@ var require_lib8 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib7(); + var auth_1 = require_auth4(); + var core_1 = require_core5(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -113495,21 +120768,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar2(require("fs")); + var path2 = __importStar2(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path2 = __importStar2(require("path")); + var io6 = __importStar2(require_io4()); + var ioUtil = __importStar2(require_io_util4()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner5 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os.EOL.length); + n = s.indexOf(os.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve2(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner5; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner4()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec4()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core5 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command4(); + var file_command_1 = require_file_command4(); + var utils_1 = require_utils11(); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils4(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable5(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable5; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug4(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug4; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info7(message) { + process.stdout.write(message + os.EOL); + } + exports2.info = info7; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary4(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary4(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils4(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform4()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core5(); + var os = require("os"); + var cp = require("child_process"); + var fs2 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs2.existsSync(lsbReleaseFile)) { + contents = fs2.readFileSync(lsbReleaseFile).toString(); + } else if (fs2.existsSync(osReleaseFile)) { + contents = fs2.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -113538,7 +122359,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core5()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -113552,7 +122373,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -113575,7 +122396,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve2) => setTimeout(resolve2, seconds * 1e3)); }); } @@ -113588,7 +122409,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -113601,21 +122422,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve2) { resolve2(value); @@ -113644,19 +122465,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs2 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var httpm = __importStar4(require_lib8()); - var semver8 = __importStar4(require_semver2()); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core5()); + var io6 = __importStar2(require_io4()); + var crypto2 = __importStar2(require("crypto")); + var fs2 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os = __importStar2(require("os")); + var path2 = __importStar2(require("path")); + var httpm = __importStar2(require_lib7()); + var semver8 = __importStar2(require_semver2()); + var stream = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec4(); var retry_helper_1 = require_retry_helper(); var HTTPError = class extends Error { constructor(httpStatusCode) { @@ -113670,8 +122491,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path2.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path2.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); @@ -113679,7 +122500,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { @@ -113693,7 +122514,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs2.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -113735,7 +122556,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -113788,7 +122609,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -113832,7 +122653,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -113853,7 +122674,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -113868,7 +122689,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -113914,7 +122735,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -113925,7 +122746,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -113944,7 +122765,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); @@ -114008,7 +122829,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -114043,23 +122864,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path2.join(_getTempDirectory(), crypto.randomUUID()); + dest = path2.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -114163,771 +122984,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy7 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib9 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy7()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info7 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info7, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info7, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info7 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info7, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info7, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info7, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info7, data, onResult) { - if (typeof data === "string") { - if (!info7.options.headers) { - info7.options.headers = {}; - } - info7.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info7.httpModule.request(info7.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info7.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info7 = {}; - info7.parsedUrl = requestUrl; - const usingSsl = info7.parsedUrl.protocol === "https:"; - info7.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info7.options = {}; - info7.options.host = info7.parsedUrl.hostname; - info7.options.port = info7.parsedUrl.port ? parseInt(info7.parsedUrl.port) : defaultPort; - info7.options.path = (info7.parsedUrl.pathname || "") + (info7.parsedUrl.search || ""); - info7.options.method = method; - info7.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info7.options.headers["user-agent"] = this.userAgent; - } - info7.options.agent = this._getAgent(info7.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info7.options); - } - } - return info7; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug4; module2.exports = function() { @@ -114955,7 +123013,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug4 = require_debug2(); + var debug4 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -115442,1103 +123500,6 @@ var require_follow_redirects = __commonJS({ } }); -// node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); - function getOptions(copy) { - const result = { - followSymbolicLinks: true, - implicitDescendants: true, - matchDirectories: true, - omitBrokenSymbolicLinks: true, - excludeHiddenFiles: false - }; - if (copy) { - if (typeof copy.followSymbolicLinks === "boolean") { - result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); - } - if (typeof copy.implicitDescendants === "boolean") { - result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); - } - if (typeof copy.matchDirectories === "boolean") { - result.matchDirectories = copy.matchDirectories; - core14.debug(`matchDirectories '${result.matchDirectories}'`); - } - if (typeof copy.omitBrokenSymbolicLinks === "boolean") { - result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); - } - if (typeof copy.excludeHiddenFiles === "boolean") { - result.excludeHiddenFiles = copy.excludeHiddenFiles; - core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); - } - } - return result; - } - exports2.getOptions = getOptions; - } -}); - -// node_modules/@actions/glob/lib/internal-path-helper.js -var require_internal_path_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - function dirname(p) { - p = safeTrimTrailingSeparator(p); - if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { - return p; - } - let result = path2.dirname(p); - if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { - result = safeTrimTrailingSeparator(result); - } - return result; - } - exports2.dirname = dirname; - function ensureAbsoluteRoot(root, itemPath) { - (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); - if (hasAbsoluteRoot(itemPath)) { - return itemPath; - } - if (IS_WINDOWS) { - if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { - let cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { - if (itemPath.length === 2) { - return `${itemPath[0]}:\\${cwd.substr(3)}`; - } else { - if (!cwd.endsWith("\\")) { - cwd += "\\"; - } - return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; - } - } else { - return `${itemPath[0]}:\\${itemPath.substr(2)}`; - } - } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { - const cwd = process.cwd(); - (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); - return `${cwd[0]}:\\${itemPath.substr(1)}`; - } - } - (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); - if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { - } else { - root += path2.sep; - } - return root + itemPath; - } - exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; - function hasAbsoluteRoot(itemPath) { - (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasAbsoluteRoot = hasAbsoluteRoot; - function hasRoot(itemPath) { - (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); - itemPath = normalizeSeparators(itemPath); - if (IS_WINDOWS) { - return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); - } - return itemPath.startsWith("/"); - } - exports2.hasRoot = hasRoot; - function normalizeSeparators(p) { - p = p || ""; - if (IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - const isUnc = /^\\\\+[^\\]/.test(p); - return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - exports2.normalizeSeparators = normalizeSeparators; - function safeTrimTrailingSeparator(p) { - if (!p) { - return ""; - } - p = normalizeSeparators(p); - if (!p.endsWith(path2.sep)) { - return p; - } - if (p === path2.sep) { - return p; - } - if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { - return p; - } - return p.substr(0, p.length - 1); - } - exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - } -}); - -// node_modules/@actions/glob/lib/internal-match-kind.js -var require_internal_match_kind2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MatchKind = void 0; - var MatchKind; - (function(MatchKind2) { - MatchKind2[MatchKind2["None"] = 0] = "None"; - MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; - MatchKind2[MatchKind2["File"] = 2] = "File"; - MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind || (exports2.MatchKind = MatchKind = {})); - } -}); - -// node_modules/@actions/glob/lib/internal-pattern-helper.js -var require_internal_pattern_helper2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var IS_WINDOWS = process.platform === "win32"; - function getSearchPaths(patterns) { - patterns = patterns.filter((x) => !x.negate); - const searchPathMap = {}; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - searchPathMap[key] = "candidate"; - } - const result = []; - for (const pattern of patterns) { - const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; - if (searchPathMap[key] === "included") { - continue; - } - let foundAncestor = false; - let tempKey = key; - let parent = pathHelper.dirname(tempKey); - while (parent !== tempKey) { - if (searchPathMap[parent]) { - foundAncestor = true; - break; - } - tempKey = parent; - parent = pathHelper.dirname(tempKey); - } - if (!foundAncestor) { - result.push(pattern.searchPath); - searchPathMap[key] = "included"; - } - } - return result; - } - exports2.getSearchPaths = getSearchPaths; - function match(patterns, itemPath) { - let result = internal_match_kind_1.MatchKind.None; - for (const pattern of patterns) { - if (pattern.negate) { - result &= ~pattern.match(itemPath); - } else { - result |= pattern.match(itemPath); - } - } - return result; - } - exports2.match = match; - function partialMatch(patterns, itemPath) { - return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); - } - exports2.partialMatch = partialMatch; - } -}); - -// node_modules/@actions/glob/lib/internal-path.js -var require_internal_path2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-path.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Path = void 0; - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var IS_WINDOWS = process.platform === "win32"; - var Path = class { - /** - * Constructs a Path - * @param itemPath Path or array of segments - */ - constructor(itemPath) { - this.segments = []; - if (typeof itemPath === "string") { - (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path2.sep); - } else { - let remaining = itemPath; - let dir = pathHelper.dirname(remaining); - while (dir !== remaining) { - const basename = path2.basename(remaining); - this.segments.unshift(basename); - remaining = dir; - dir = pathHelper.dirname(remaining); - } - this.segments.unshift(remaining); - } - } else { - (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); - for (let i = 0; i < itemPath.length; i++) { - let segment = itemPath[i]; - (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); - segment = pathHelper.normalizeSeparators(itemPath[i]); - if (i === 0 && pathHelper.hasRoot(segment)) { - segment = pathHelper.safeTrimTrailingSeparator(segment); - (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); - this.segments.push(segment); - } else { - (0, assert_1.default)(!segment.includes(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); - this.segments.push(segment); - } - } - } - } - /** - * Converts the path to it's string representation - */ - toString() { - let result = this.segments[0]; - let skipSlash = result.endsWith(path2.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); - for (let i = 1; i < this.segments.length; i++) { - if (skipSlash) { - skipSlash = false; - } else { - result += path2.sep; - } - result += this.segments[i]; - } - return result; - } - }; - exports2.Path = Path; - } -}); - -// node_modules/@actions/glob/lib/internal-pattern.js -var require_internal_pattern2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Pattern = void 0; - var os = __importStar4(require("os")); - var path2 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper2()); - var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch2(); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_path_1 = require_internal_path2(); - var IS_WINDOWS = process.platform === "win32"; - var Pattern = class _Pattern { - constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { - this.negate = false; - let pattern; - if (typeof patternOrNegate === "string") { - pattern = patternOrNegate.trim(); - } else { - segments = segments || []; - (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); - const root = _Pattern.getLiteral(segments[0]); - (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); - pattern = new internal_path_1.Path(segments).toString().trim(); - if (patternOrNegate) { - pattern = `!${pattern}`; - } - } - while (pattern.startsWith("!")) { - this.negate = !this.negate; - pattern = pattern.substr(1).trim(); - } - pattern = _Pattern.fixupPattern(pattern, homedir); - this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path2.sep); - pattern = pathHelper.safeTrimTrailingSeparator(pattern); - let foundGlob = false; - const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); - this.searchPath = new internal_path_1.Path(searchSegments).toString(); - this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); - this.isImplicitPattern = isImplicitPattern; - const minimatchOptions = { - dot: true, - nobrace: true, - nocase: IS_WINDOWS, - nocomment: true, - noext: true, - nonegate: true - }; - pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; - this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); - } - /** - * Matches the pattern against the specified path - */ - match(itemPath) { - if (this.segments[this.segments.length - 1] === "**") { - itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path2.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path2.sep}`; - } - } else { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - } - if (this.minimatch.match(itemPath)) { - return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; - } - return internal_match_kind_1.MatchKind.None; - } - /** - * Indicates whether the pattern may match descendants of the specified path - */ - partialMatch(itemPath) { - itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); - if (pathHelper.dirname(itemPath) === itemPath) { - return this.rootRegExp.test(itemPath); - } - return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); - } - /** - * Escapes glob patterns within a path - */ - static globEscape(s) { - return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); - } - /** - * Normalizes slashes and ensures absolute root - */ - static fixupPattern(pattern, homedir) { - (0, assert_1.default)(pattern, "pattern cannot be empty"); - const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); - pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path2.sep}`)) { - pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { - homedir = homedir || os.homedir(); - (0, assert_1.default)(homedir, "Unable to determine HOME directory"); - (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); - pattern = _Pattern.globEscape(homedir) + pattern.substr(1); - } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); - if (pattern.length > 2 && !root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(2); - } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { - let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); - if (!root.endsWith("\\")) { - root += "\\"; - } - pattern = _Pattern.globEscape(root) + pattern.substr(1); - } else { - pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); - } - return pathHelper.normalizeSeparators(pattern); - } - /** - * Attempts to unescape a pattern segment to create a literal path segment. - * Otherwise returns empty string. - */ - static getLiteral(segment) { - let literal = ""; - for (let i = 0; i < segment.length; i++) { - const c = segment[i]; - if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { - literal += segment[++i]; - continue; - } else if (c === "*" || c === "?") { - return ""; - } else if (c === "[" && i + 1 < segment.length) { - let set2 = ""; - let closed = -1; - for (let i2 = i + 1; i2 < segment.length; i2++) { - const c2 = segment[i2]; - if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { - set2 += segment[++i2]; - continue; - } else if (c2 === "]") { - closed = i2; - break; - } else { - set2 += c2; - } - } - if (closed >= 0) { - if (set2.length > 1) { - return ""; - } - if (set2) { - literal += set2; - i = closed; - continue; - } - } - } - literal += c; - } - return literal; - } - /** - * Escapes regexp special characters - * https://javascript.info/regexp-escaping - */ - static regExpEscape(s) { - return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); - } - }; - exports2.Pattern = Pattern; - } -}); - -// node_modules/@actions/glob/lib/internal-search-state.js -var require_internal_search_state2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.SearchState = void 0; - var SearchState = class { - constructor(path2, level) { - this.path = path2; - this.level = level; - } - }; - exports2.SearchState = SearchState; - } -}); - -// node_modules/@actions/glob/lib/internal-globber.js -var require_internal_globber2 = __commonJS({ - "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper2()); - var internal_match_kind_1 = require_internal_match_kind2(); - var internal_pattern_1 = require_internal_pattern2(); - var internal_search_state_1 = require_internal_search_state2(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var _a, e_1, _b, _c; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _d = true, _e = __asyncValues4(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const itemPath = _c; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } finally { - if (e_1) throw e_1.error; - } - } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } - } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs2.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); - } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); - } - } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); - } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; - } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); - } - } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); - return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs2.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; - } - } else { - stats = yield fs2.promises.lstat(item.path); - } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs2.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); - } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/glob/lib/internal-hash-files.js -var require_internal_hash_files = __commonJS({ - "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var stream = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var path2 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs2.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto.createHash("sha256"); - const pipeline = util.promisify(stream.pipeline); - yield pipeline(fs2.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) { - hasMatch = true; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; - } - } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; - } - }); - } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create3(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); - }); - } - exports2.create = create3; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { - return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; - } - const globber = yield create3(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); - }); - } - exports2.hashFiles = hashFiles2; - } -}); - // src/upload-sarif-action-post.ts var core13 = __toESM(require_core()); @@ -116546,11 +123507,11 @@ var core13 = __toESM(require_core()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -119375,7 +126336,7 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); // src/analyses.ts var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { @@ -119532,7 +126493,7 @@ var cliErrorsConfig = { var core6 = __toESM(require_core()); // src/config/db-config.ts -var jsonschema = __toESM(require_lib6()); +var jsonschema = __toESM(require_lib5()); var semver2 = __toESM(require_semver2()); var PACK_IDENTIFIER_PATTERN = (function() { const alphaNumeric = "[a-z0-9]"; @@ -119545,12 +126506,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { var semver4 = __toESM(require_semver2()); // src/overlay-database-utils.ts -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); // src/logging.ts var core8 = __toESM(require_core()); @@ -119787,7 +126748,7 @@ var featureConfig = { }; // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -119825,21 +126786,21 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts var core9 = __toESM(require_core()); -var import_http_client = __toESM(require_lib9()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var actionsCache3 = __toESM(require_cache4()); +var glob = __toESM(require_glob2()); // src/debug-artifacts.ts function sanitizeArtifactName(name) { diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 4c2397884..c072c51d9 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -38,7 +38,8 @@ var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; + exports2.toCommandValue = toCommandValue; + exports2.toCommandProperties = toCommandProperties; function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -47,7 +48,6 @@ var require_utils = __commonJS({ } return JSON.stringify(input); } - exports2.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; @@ -61,7 +61,6 @@ var require_utils = __commonJS({ endColumn: annotationProperties.endColumn }; } - exports2.toCommandProperties = toCommandProperties; } }); @@ -69,7 +68,7 @@ var require_utils = __commonJS({ var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -82,33 +81,42 @@ var require_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os3 = __importStar4(require("os")); + exports2.issueCommand = issueCommand; + exports2.issue = issue; + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os3.EOL); } - exports2.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } - exports2.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -126,14 +134,14 @@ var require_command = __commonJS({ let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { - const val2 = this.properties[key]; - if (val2) { + const val = this.properties[key]; + if (val) { if (first) { first = false; } else { cmdStr += ","; } - cmdStr += `${key}=${escapeProperty(val2)}`; + cmdStr += `${key}=${escapeProperty(val)}`; } } } @@ -155,7 +163,7 @@ var require_command = __commonJS({ var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -168,25 +176,36 @@ var require_file_command = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); - var os3 = __importStar4(require("os")); + exports2.issueFileCommand = issueFileCommand; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + var crypto2 = __importStar2(require("crypto")); + var fs13 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -200,9 +219,8 @@ var require_file_command = __commonJS({ encoding: "utf8" }); } - exports2.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; const convertedValue = (0, utils_1.toCommandValue)(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); @@ -212,16 +230,16 @@ var require_file_command = __commonJS({ } return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js +// node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.checkBypass = checkBypass; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { @@ -245,7 +263,6 @@ var require_proxy = __commonJS({ return void 0; } } - exports2.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; @@ -277,7 +294,6 @@ var require_proxy = __commonJS({ } return false; } - exports2.checkBypass = checkBypass; function isLoopbackAddress(host) { const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); @@ -1086,8 +1102,8 @@ var require_util = __commonJS({ } } var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; - function parseKeepAliveTimeout(val2) { - const m = val2.toString().match(KEEPALIVE_TIMEOUT_EXPR); + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); return m ? parseInt(m[1], 10) * 1e3 : null; } function headerNameToString(value) { @@ -1097,19 +1113,19 @@ var require_util = __commonJS({ if (!Array.isArray(headers)) return headers; for (let i = 0; i < headers.length; i += 2) { const key = headers[i].toString().toLowerCase(); - let val2 = obj[key]; - if (!val2) { + let val = obj[key]; + if (!val) { if (Array.isArray(headers[i + 1])) { obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } } else { - if (!Array.isArray(val2)) { - val2 = [val2]; - obj[key] = val2; + if (!Array.isArray(val)) { + val = [val]; + obj[key] = val; } - val2.push(headers[i + 1].toString("utf8")); + val.push(headers[i + 1].toString("utf8")); } } if ("content-length" in obj && "content-disposition" in obj) { @@ -1123,14 +1139,14 @@ var require_util = __commonJS({ let contentDispositionIdx = -1; for (let n = 0; n < headers.length; n += 2) { const key = headers[n + 0].toString(); - const val2 = headers[n + 1].toString("utf8"); + const val = headers[n + 1].toString("utf8"); if (key.length === 14 && (key === "content-length" || key.toLowerCase() === "content-length")) { - ret.push(key, val2); + ret.push(key, val); hasContentLength = true; } else if (key.length === 19 && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) { - contentDispositionIdx = ret.push(key, val2) - 1; + contentDispositionIdx = ret.push(key, val) - 1; } else { - ret.push(key, val2); + ret.push(key, val); } } if (hasContentLength && contentDispositionIdx !== -1) { @@ -1259,13 +1275,13 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } var hasToWellFormed = !!String.prototype.toWellFormed; - function toUSVString(val2) { + function toUSVString(val) { if (hasToWellFormed) { - return `${val2}`.toWellFormed(); + return `${val}`.toWellFormed(); } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val2); + return nodeUtil.toUSVString(val); } - return `${val2}`; + return `${val}`; } function parseRangeHeader(range) { if (range == null || range === "") return { start: 0, end: null, size: null }; @@ -3637,11 +3653,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); + supportedHashes = crypto2.getHashes().filter((hash2) => possibleRelevantHashes.includes(hash2)); } catch { } function responseURL(response) { @@ -3918,7 +3934,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto === void 0) { + if (crypto2 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3933,7 +3949,7 @@ var require_util2 = __commonJS({ for (const item of metadata) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto2.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5279,8 +5295,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto = require("node:crypto"); - random = (max) => crypto.randomInt(0, max); + const crypto2 = require("node:crypto"); + random = (max) => crypto2.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5932,41 +5948,41 @@ var require_request = __commonJS({ return headers; } }; - function processHeaderValue(key, val2, skipAppend) { - if (val2 && typeof val2 === "object") { + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { throw new InvalidArgumentError(`invalid ${key} header`); } - val2 = val2 != null ? `${val2}` : ""; - if (headerCharRegex.exec(val2) !== null) { + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - return skipAppend ? val2 : `${key}: ${val2}\r + return skipAppend ? val : `${key}: ${val}\r `; } - function processHeader(request, key, val2, skipAppend = false) { - if (val2 && (typeof val2 === "object" && !Array.isArray(val2))) { + function processHeader(request, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val2 === void 0) { + } else if (val === void 0) { return; } if (request.host === null && key.length === 4 && key.toLowerCase() === "host") { - if (headerCharRegex.exec(val2) !== null) { + if (headerCharRegex.exec(val) !== null) { throw new InvalidArgumentError(`invalid ${key} header`); } - request.host = val2; + request.host = val; } else if (request.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { - request.contentLength = parseInt(val2, 10); + request.contentLength = parseInt(val, 10); if (!Number.isFinite(request.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } } else if (request.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { - request.contentType = val2; - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + request.contentType = val; + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { throw new InvalidArgumentError("invalid transfer-encoding header"); } else if (key.length === 10 && key.toLowerCase() === "connection") { - const value = typeof val2 === "string" ? val2.toLowerCase() : null; + const value = typeof val === "string" ? val.toLowerCase() : null; if (value !== "close" && value !== "keep-alive") { throw new InvalidArgumentError("invalid connection header"); } else if (value === "close") { @@ -5981,18 +5997,18 @@ var require_request = __commonJS({ } else if (tokenRegExp.exec(key) === null) { throw new InvalidArgumentError("invalid header key"); } else { - if (Array.isArray(val2)) { - for (let i = 0; i < val2.length; i++) { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val2[i], skipAppend)}`; - else request.headers[key] = processHeaderValue(key, val2[i], skipAppend); + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - request.headers += processHeaderValue(key, val2[i]); + request.headers += processHeaderValue(key, val[i]); } } } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val2, skipAppend); - else request.headers += processHeaderValue(key, val2); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend); + else request.headers += processHeaderValue(key, val); } } } @@ -12583,8 +12599,8 @@ var require_request2 = __commonJS({ const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const [key, val2] of headers) { - headersList.append(key, val2); + for (const [key, val] of headers) { + headersList.append(key, val); } headersList.cookies = headers.cookies; } else { @@ -13884,24 +13900,24 @@ var require_fetch = __commonJS({ if (Array.isArray(headersList)) { for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()); + codings = val.toLowerCase().split(",").map((x) => x.trim()); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); for (const key of keys) { - const val2 = headersList[key]; + const val = headersList[key]; if (key.toLowerCase() === "content-encoding") { - codings = val2.toLowerCase().split(",").map((x) => x.trim()).reverse(); + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); } else if (key.toLowerCase() === "location") { - location = val2; + location = val; } - headers[kHeadersList].append(key, val2); + headers[kHeadersList].append(key, val); } } this.body = new Readable2({ read: resume }); @@ -13968,8 +13984,8 @@ var require_fetch = __commonJS({ const headers = new Headers(); for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); - const val2 = headersList[n + 1].toString("latin1"); - headers[kHeadersList].append(key, val2); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); } resolve6({ status, @@ -16330,9 +16346,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16351,7 +16367,7 @@ var require_connection = __commonJS({ const headersList = new Headers(options.headers)[kHeadersList]; request.headersList = headersList; } - const keyValue = crypto.randomBytes(16).toString("base64"); + const keyValue = crypto2.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue); request.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16380,7 +16396,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16460,9 +16476,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto; + var crypto2; try { - crypto = require("crypto"); + crypto2 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16471,7 +16487,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto.randomBytes(4); + this.maskKey = crypto2.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17292,11 +17308,11 @@ var require_undici = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js +// node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { + "node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -17309,21 +17325,31 @@ var require_lib = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -17351,11 +17377,13 @@ var require_lib = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy()); - var tunnel = __importStar4(require_tunnel2()); + exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + exports2.getProxyUrl = getProxyUrl; + exports2.isHttps = isHttps; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -17400,7 +17428,6 @@ var require_lib = __commonJS({ const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } - exports2.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, @@ -17430,8 +17457,8 @@ var require_lib = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -17443,8 +17470,8 @@ var require_lib = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -17461,7 +17488,6 @@ var require_lib = __commonJS({ const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } - exports2.isHttps = isHttps; var HttpClient2 = class { constructor(userAgent, handlers, requestOptions) { this._ignoreSslError = false; @@ -17501,42 +17527,42 @@ var require_lib = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -17544,36 +17570,36 @@ var require_lib = __commonJS({ * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + getJson(requestUrl_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + postJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + putJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + patchJson(requestUrl_1, obj_1) { + return __awaiter2(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); @@ -17584,7 +17610,7 @@ var require_lib = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -17658,7 +17684,7 @@ var require_lib = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -17769,12 +17795,65 @@ var require_lib = __commonJS({ } return lowercaseKeys(headers || {}); } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) { + clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } } - return additionalHeaders[header] || clientHeader || _default2; + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) { + return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) { + if (typeof headerValue === "number") { + clientHeader = String(headerValue); + } else if (Array.isArray(headerValue)) { + clientHeader = headerValue.join(", "); + } else { + clientHeader = headerValue; + } + } + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) { + if (typeof additionalValue === "number") { + return String(additionalValue); + } else if (Array.isArray(additionalValue)) { + return additionalValue.join(", "); + } else { + return additionalValue; + } + } + if (clientHeader !== void 0) { + return clientHeader; + } + return _default2; } _getAgent(parsedUrl) { let agent; @@ -17845,15 +17924,15 @@ var require_lib = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17911,11 +17990,11 @@ var require_lib = __commonJS({ } }); -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js +// node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -17960,7 +18039,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -17983,7 +18062,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18006,7 +18085,7 @@ var require_auth = __commonJS({ return false; } handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } @@ -18019,7 +18098,7 @@ var require_auth = __commonJS({ var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18074,8 +18153,8 @@ var require_oidc_utils = __commonJS({ return runtimeUrl; } static getCall(id_token_url) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error3) => { throw new Error(`Failed to get ID Token. @@ -18092,7 +18171,7 @@ var require_oidc_utils = __commonJS({ }); } static getIDToken(audience) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { @@ -18117,7 +18196,7 @@ var require_oidc_utils = __commonJS({ var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18162,7 +18241,7 @@ var require_summary = __commonJS({ * @returns step summary file path */ filePath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } @@ -18203,7 +18282,7 @@ var require_summary = __commonJS({ * @returns {Promise} summary instance */ write(options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; @@ -18217,7 +18296,7 @@ var require_summary = __commonJS({ * @returns {Summary} summary instance */ clear() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } @@ -18411,7 +18490,7 @@ var require_summary = __commonJS({ var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -18424,66 +18503,89 @@ var require_path_utils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path12 = __importStar4(require("path")); + exports2.toPosixPath = toPosixPath; + exports2.toWin32Path = toWin32Path; + exports2.toPlatformPath = toPlatformPath; + var path12 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } - exports2.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } - exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path12.sep); } - exports2.toPlatformPath = toPlatformPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18512,17 +18614,32 @@ var require_io_util = __commonJS({ }; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs13 = __importStar2(require("fs")); + var path12 = __importStar2(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + const result = yield fs13.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } exports2.UV_FS_O_EXLOCK = 268435456; exports2.READONLY = fs13.constants.O_RDONLY; function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { try { - yield exports2.stat(fsPath); + yield (0, exports2.stat)(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; @@ -18532,14 +18649,12 @@ var require_io_util = __commonJS({ return true; }); } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + function isDirectory(fsPath_1) { + return __awaiter2(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18550,12 +18665,11 @@ var require_io_util = __commonJS({ } return p.startsWith("/"); } - exports2.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18578,7 +18692,7 @@ var require_io_util = __commonJS({ filePath = originalFilePath + extension; stats = void 0; try { - stats = yield exports2.stat(filePath); + stats = yield (0, exports2.stat)(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); @@ -18589,7 +18703,7 @@ var require_io_util = __commonJS({ try { const directory = path12.dirname(filePath); const upperName = path12.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { + for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path12.join(directory, actualName); break; @@ -18609,7 +18723,6 @@ var require_io_util = __commonJS({ return ""; }); } - exports2.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports2.IS_WINDOWS) { @@ -18619,44 +18732,57 @@ var require_io_util = __commonJS({ return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } - exports2.getCmdPath = getCmdPath; } }); -// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js +// node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18684,12 +18810,17 @@ var require_io = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path12 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + var path12 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util()); + function cp(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { @@ -18714,9 +18845,8 @@ var require_io = __commonJS({ } }); } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { + function mv(source_1, dest_1) { + return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { @@ -18735,9 +18865,8 @@ var require_io = __commonJS({ yield ioUtil.rename(source, dest); }); } - exports2.mv = mv; function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); @@ -18755,16 +18884,14 @@ var require_io = __commonJS({ } }); } - exports2.rmRF = rmRF; function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); + return __awaiter2(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } - exports2.mkdirP = mkdirP; function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18786,9 +18913,8 @@ var require_io = __commonJS({ return ""; }); } - exports2.which = which6; function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } @@ -18828,7 +18954,6 @@ var require_io = __commonJS({ return matches; }); } - exports2.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); @@ -18836,7 +18961,7 @@ var require_io = __commonJS({ return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; @@ -18856,7 +18981,7 @@ var require_io = __commonJS({ }); } function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); @@ -18881,30 +19006,44 @@ var require_io = __commonJS({ var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -18932,13 +19071,14 @@ var require_toolrunner = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os3 = __importStar4(require("os")); - var events = __importStar4(require("events")); - var child = __importStar4(require("child_process")); - var path12 = __importStar4(require("path")); - var io6 = __importStar4(require_io()); - var ioUtil = __importStar4(require_io_util()); + exports2.ToolRunner = void 0; + exports2.argStringToArray = argStringToArray; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path12 = __importStar2(require("path")); + var io6 = __importStar2(require_io()); + var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner6 = class extends events.EventEmitter { @@ -19149,12 +19289,12 @@ var require_toolrunner = __commonJS({ * @returns number */ exec() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19295,7 +19435,6 @@ var require_toolrunner = __commonJS({ } return args; } - exports2.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); @@ -19323,7 +19462,7 @@ var require_toolrunner = __commonJS({ if (this.processClosed) { this._setResult(); } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + this.timeout = (0, timers_1.setTimeout)(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -19365,30 +19504,44 @@ var require_toolrunner = __commonJS({ var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19416,11 +19569,12 @@ var require_exec = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; + exports2.exec = exec; + exports2.getExecOutput = getExecOutput; var string_decoder_1 = require("string_decoder"); - var tr = __importStar4(require_toolrunner()); + var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); @@ -19431,10 +19585,9 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, _b; let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); @@ -19464,7 +19617,6 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; } }); @@ -19472,7 +19624,7 @@ var require_exec = __commonJS({ var require_platform = __commonJS({ "node_modules/@actions/core/lib/platform.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19485,21 +19637,31 @@ var require_platform = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19526,14 +19688,15 @@ var require_platform = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault4(require("os")); - var exec = __importStar4(require_exec()); - var getWindowsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + exports2.getDetails = getDetails; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); @@ -19545,7 +19708,7 @@ var require_platform = __commonJS({ version: version.trim() }; }); - var getMacOsInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true @@ -19557,7 +19720,7 @@ var require_platform = __commonJS({ version }; }); - var getLinuxInfo = () => __awaiter4(void 0, void 0, void 0, function* () { + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); @@ -19573,7 +19736,7 @@ var require_platform = __commonJS({ exports2.isMacOS = exports2.platform === "darwin"; exports2.isLinux = exports2.platform === "linux"; function getDetails() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { platform: exports2.platform, arch: exports2.arch, @@ -19583,7 +19746,6 @@ var require_platform = __commonJS({ }); }); } - exports2.getDetails = getDetails; } }); @@ -19591,7 +19753,7 @@ var require_platform = __commonJS({ var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19604,21 +19766,31 @@ var require_core = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -19646,32 +19818,51 @@ var require_core = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.ExitCode = void 0; + exports2.exportVariable = exportVariable6; + exports2.setSecret = setSecret; + exports2.addPath = addPath; + exports2.getInput = getInput2; + exports2.getMultilineInput = getMultilineInput; + exports2.getBooleanInput = getBooleanInput; + exports2.setOutput = setOutput2; + exports2.setCommandEcho = setCommandEcho; + exports2.setFailed = setFailed2; + exports2.isDebug = isDebug2; + exports2.debug = debug6; + exports2.error = error3; + exports2.warning = warning10; + exports2.notice = notice; + exports2.info = info6; + exports2.startGroup = startGroup3; + exports2.endGroup = endGroup3; + exports2.group = group; + exports2.saveState = saveState2; + exports2.getState = getState2; + exports2.getIDToken = getIDToken; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); + var os3 = __importStar2(require("os")); + var path12 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode || (exports2.ExitCode = ExitCode = {})); - function exportVariable6(name, val2) { - const convertedVal = (0, utils_1.toCommandValue)(val2); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val2)); + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); } (0, command_1.issueCommand)("set-env", { name }, convertedVal); } - exports2.exportVariable = exportVariable6; function setSecret(secret) { (0, command_1.issueCommand)("add-mask", {}, secret); } - exports2.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { @@ -19681,18 +19872,16 @@ var require_core = __commonJS({ } process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; } - exports2.addPath = addPath; function getInput2(name, options) { - const val2 = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { - return val2; + return val; } - return val2.trim(); + return val.trim(); } - exports2.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { @@ -19700,19 +19889,17 @@ var require_core = __commonJS({ } return inputs.map((input) => input.trim()); } - exports2.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; - const val2 = getInput2(name, options); - if (trueValue.includes(val2)) + const val = getInput2(name, options); + if (trueValue.includes(val)) return true; - if (falseValue.includes(val2)) + if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } - exports2.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { @@ -19721,50 +19908,39 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); process.stdout.write(os3.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.setOutput = setOutput2; function setCommandEcho(enabled) { (0, command_1.issue)("echo", enabled ? "on" : "off"); } - exports2.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error3(message); } - exports2.setFailed = setFailed2; function isDebug2() { return process.env["RUNNER_DEBUG"] === "1"; } - exports2.isDebug = isDebug2; function debug6(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug6; function error3(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.error = error3; function warning10(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.warning = warning10; function notice(message, properties = {}) { (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports2.notice = notice; function info6(message) { process.stdout.write(message + os3.EOL); } - exports2.info = info6; function startGroup3(name) { (0, command_1.issue)("group", name); } - exports2.startGroup = startGroup3; function endGroup3() { (0, command_1.issue)("endgroup"); } - exports2.endGroup = endGroup3; function group(name, fn) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { startGroup3(name); let result; try { @@ -19775,7 +19951,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return result; }); } - exports2.group = group; function saveState2(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { @@ -19783,17 +19958,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - exports2.saveState = saveState2; function getState2(name) { return process.env[`STATE_${name}`] || ""; } - exports2.getState = getState2; function getIDToken(aud) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } - exports2.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { return summary_1.summary; @@ -19812,7 +19984,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); - exports2.platform = __importStar4(require_platform()); + exports2.platform = __importStar2(require_platform()); } }); @@ -19961,7 +20133,7 @@ var require_proxy2 = __commonJS({ var require_lib2 = __commonJS({ "node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -19974,21 +20146,21 @@ var require_lib2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -20017,10 +20189,10 @@ var require_lib2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy2()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy2()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -20095,8 +20267,8 @@ var require_lib2 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -20108,8 +20280,8 @@ var require_lib2 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -20166,42 +20338,42 @@ var require_lib2 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -20210,14 +20382,14 @@ var require_lib2 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20226,7 +20398,7 @@ var require_lib2 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20235,7 +20407,7 @@ var require_lib2 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -20249,7 +20421,7 @@ var require_lib2 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -20323,7 +20495,7 @@ var require_lib2 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -20510,15 +20682,15 @@ var require_lib2 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -20580,7 +20752,7 @@ var require_lib2 = __commonJS({ var require_utils3 = __commonJS({ "node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -20593,21 +20765,21 @@ var require_utils3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -20636,7 +20808,7 @@ var require_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getApiBaseUrl = exports2.getProxyFetch = exports2.getProxyAgentDispatcher = exports2.getProxyAgent = exports2.getAuthString = void 0; - var httpClient = __importStar4(require_lib2()); + var httpClient = __importStar2(require_lib2()); var undici_1 = require_undici(); function getAuthString(token, options) { if (!token && !options.auth) { @@ -20659,7 +20831,7 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + const proxyFetch = (url2, opts) => __awaiter2(this, void 0, void 0, function* () { return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; @@ -25134,7 +25306,7 @@ var require_dist_node13 = __commonJS({ var require_utils4 = __commonJS({ "node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25147,24 +25319,24 @@ var require_utils4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; - var Context = __importStar4(require_context()); - var Utils = __importStar4(require_utils3()); + var Context = __importStar2(require_context()); + var Utils = __importStar2(require_utils3()); var core_1 = require_dist_node11(); var plugin_rest_endpoint_methods_1 = require_dist_node12(); var plugin_paginate_rest_1 = require_dist_node13(); @@ -25194,7 +25366,7 @@ var require_utils4 = __commonJS({ var require_github = __commonJS({ "node_modules/@actions/github/lib/github.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -25207,23 +25379,23 @@ var require_github = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; - var Context = __importStar4(require_context()); + var Context = __importStar2(require_context()); var utils_1 = require_utils4(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { @@ -25234,464 +25406,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js -var require_io_util2 = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - exports2.readlink = readlink; - exports2.exists = exists; - exports2.isDirectory = isDirectory; - exports2.isRooted = isRooted; - exports2.tryGetExecutablePath = tryGetExecutablePath; - exports2.getCmdPath = getCmdPath; - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - function readlink(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - const result = yield fs13.promises.readlink(fsPath); - if (exports2.IS_WINDOWS && !result.endsWith("\\")) { - return `${result}\\`; - } - return result; - }); - } - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs13.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield (0, exports2.stat)(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - function isDirectory(fsPath_1) { - return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); - return stats.isDirectory(); - }); - } - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path12.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield (0, exports2.stat)(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path12.dirname(filePath); - const upperName = path12.basename(filePath).toUpperCase(); - for (const actualName of yield (0, exports2.readdir)(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io2 = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cp = cp; - exports2.mv = mv; - exports2.rmRF = rmRF; - exports2.mkdirP = mkdirP; - exports2.which = which6; - exports2.findInPath = findInPath; - var assert_1 = require("assert"); - var path12 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util2()); - function cp(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path12.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - function mv(source_1, dest_1) { - return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path12.join(dest, path12.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path12.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - (0, assert_1.ok)(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path12.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path12.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27651,12 +27365,12 @@ var require_package = __commonJS({ }, license: "MIT", dependencies: { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -29251,11 +28965,1440 @@ var require_dist_node15 = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js -var require_internal_glob_options_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { +// node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); + } + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; + } + exports2.toCommandProperties = toCommandProperties; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js +var require_file_command2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs13 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils5(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs13.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs13.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" + }); + } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; + } + exports2.prepareKeyValueMessage = prepareKeyValueMessage; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js +var require_proxy3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + } else { + return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + } + })(); + if (proxyVar) { + try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } + } + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { + if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { + return true; + } + } + return false; + } + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + 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(url2, base) { + super(url2, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy3()); + var tunnel = __importStar2(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; + })(Headers || (exports2.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); + } + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve6(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve6(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream2, additionalHeaders) { + return __awaiter2(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream2, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter2(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + const parsedUrl = new URL(requestUrl); + let info6 = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info6, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info6, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info6, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info6, data) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve6(res); + } + } + this.requestRawWithCallback(info6, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info6, data, onResult) { + if (typeof data === "string") { + if (!info6.options.headers) { + info6.options.headers = {}; + } + info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info6.httpModule.request(info6.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info6.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") { + req.write(data, "utf8"); + } + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info6 = {}; + info6.parsedUrl = requestUrl; + const usingSsl = info6.parsedUrl.protocol === "https:"; + info6.httpModule = usingSsl ? https2 : http; + const defaultPort = usingSsl ? 443 : 80; + info6.options = {}; + info6.options.host = info6.parsedUrl.hostname; + info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; + info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); + info6.options.method = method; + info6.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info6.options.headers["user-agent"] = this.userAgent; + } + info6.options.agent = this._getAgent(info6.parsedUrl); + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info6.options); + } + } + return info6; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + }), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { + token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` + })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter2(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve6(response); + } + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve6(response); + } + })); + }); + } + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + } +}); + +// node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib3(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js +var require_summary2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js +var require_path_utils2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path12 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path12.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; @@ -29264,28 +30407,1394 @@ var require_internal_glob_options_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs13 = __importStar2(require("fs")); + var path12 = __importStar2(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs13.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path12.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path12.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path12 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path12.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path12.join(dest, path12.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path12.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path12.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path12.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path12 = __importStar2(require("path")); + var io6 = __importStar2(require_io2()); + var ioUtil = __importStar2(require_io_util2()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve6(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js +var require_exec2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner2()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js +var require_platform2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec2()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/glob/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/@actions/glob/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command2(); + var utils_1 = require_utils5(); + var os3 = __importStar2(require("os")); + var path12 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils2(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug6(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug6; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary2(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary2(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils2(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform2()); + } +}); + +// node_modules/@actions/glob/lib/internal-glob-options-helper.js +var require_internal_glob_options_helper = __commonJS({ + "node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core2()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, - omitBrokenSymbolicLinks: true + matchDirectories: true, + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { @@ -29296,10 +31805,18 @@ var require_internal_glob_options_helper = __commonJS({ result.implicitDescendants = copy.implicitDescendants; core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } + if (typeof copy.matchDirectories === "boolean") { + result.matchDirectories = copy.matchDirectories; + core14.debug(`matchDirectories '${result.matchDirectories}'`); + } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === "boolean") { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -29307,40 +31824,44 @@ var require_internal_glob_options_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js +// node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path12 = __importStar4(require("path")); - var assert_1 = __importDefault4(require("assert")); + var path12 = __importStar2(require("path")); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { p = safeTrimTrailingSeparator(p); @@ -29355,15 +31876,15 @@ var require_internal_path_helper = __commonJS({ } exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; @@ -29378,11 +31899,11 @@ var require_internal_path_helper = __commonJS({ } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path12.sep; @@ -29391,7 +31912,7 @@ var require_internal_path_helper = __commonJS({ } exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); @@ -29400,7 +31921,7 @@ var require_internal_path_helper = __commonJS({ } exports2.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); @@ -29438,9 +31959,9 @@ var require_internal_path_helper = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js +// node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { + "node_modules/@actions/glob/lib/internal-match-kind.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.MatchKind = void 0; @@ -29450,40 +31971,44 @@ var require_internal_match_kind = __commonJS({ MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; - })(MatchKind = exports2.MatchKind || (exports2.MatchKind = {})); + })(MatchKind || (exports2.MatchKind = MatchKind = {})); } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js +// node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.partialMatch = exports2.match = exports2.getSearchPaths = void 0; - var pathHelper = __importStar4(require_internal_path_helper()); + var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { @@ -30327,41 +32852,45 @@ var require_minimatch = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js +// node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { + "node_modules/@actions/glob/lib/internal-path.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path12 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var path12 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** @@ -30371,7 +32900,7 @@ var require_internal_path = __commonJS({ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path12.sep); @@ -30387,17 +32916,17 @@ var require_internal_path = __commonJS({ this.segments.unshift(remaining); } } else { - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -30424,42 +32953,46 @@ var require_internal_path = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js +// node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { + "node_modules/@actions/glob/lib/internal-pattern.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); - var pathHelper = __importStar4(require_internal_path_helper()); - var assert_1 = __importDefault4(require("assert")); + var os3 = __importStar2(require("os")); + var path12 = __importStar2(require("path")); + var pathHelper = __importStar2(require_internal_path_helper()); + var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); @@ -30472,9 +33005,9 @@ var require_internal_pattern = __commonJS({ pattern = patternOrNegate.trim(); } else { segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -30541,17 +33074,17 @@ var require_internal_pattern = __commonJS({ * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir) { - assert_1.default(pattern, "pattern cannot be empty"); + (0, assert_1.default)(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path12.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { homedir = homedir || os3.homedir(); - assert_1.default(homedir, "Unable to determine HOME directory"); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, "Unable to determine HOME directory"); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); @@ -30625,9 +33158,9 @@ var require_internal_pattern = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js +// node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { + "node_modules/@actions/glob/lib/internal-search-state.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; @@ -30641,34 +33174,38 @@ var require_internal_search_state = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js +// node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports2) { + "node_modules/@actions/glob/lib/internal-globber.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -30695,7 +33232,7 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -30714,10 +33251,10 @@ var require_internal_globber = __commonJS({ }, reject); } }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + var __await2 = exports2 && exports2.__await || function(v) { + return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + var __asyncGenerator2 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -30738,7 +33275,7 @@ var require_internal_globber = __commonJS({ } } function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); @@ -30752,11 +33289,11 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs13 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path12 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); + var core14 = __importStar2(require_core2()); + var fs13 = __importStar2(require("fs")); + var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); + var path12 = __importStar2(require("path")); + var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); @@ -30771,19 +33308,21 @@ var require_internal_globber = __commonJS({ return this.searchPaths.slice(); } glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + return __awaiter2(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues2(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } @@ -30792,7 +33331,7 @@ var require_internal_globber = __commonJS({ }); } globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { + return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { @@ -30805,7 +33344,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs13.promises.lstat(searchPath)); + yield __await2(fs13.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -30822,24 +33361,27 @@ var require_internal_globber = __commonJS({ if (!match && !partialMatch) { continue; } - const stats = yield __await4( + const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } + if (options.excludeHiddenFiles && path12.basename(item.path).match(/^\./)) { + continue; + } if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); + if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) { + yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + yield yield __await2(item.path); } } }); @@ -30848,7 +33390,7 @@ var require_internal_globber = __commonJS({ * Constructs a DefaultGlobber */ static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); @@ -30867,7 +33409,7 @@ var require_internal_globber = __commonJS({ }); } static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { @@ -30904,11 +33446,151 @@ var require_internal_globber = __commonJS({ } }); -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { +// node_modules/@actions/glob/lib/internal-hash-files.js +var require_internal_hash_files = __commonJS({ + "node_modules/@actions/glob/lib/internal-hash-files.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); + }); + }; + } + function settle(resolve6, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve6({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar2(require("crypto")); + var core14 = __importStar2(require_core2()); + var fs13 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var path12 = __importStar2(require("path")); + function hashFiles(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter2(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path12.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs13.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash2 = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs13.createReadStream(file), hash2); + result.write(hash2.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -30936,435 +33618,26 @@ var require_glob = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; + exports2.hashFiles = exports2.create = void 0; var internal_globber_1 = require_internal_globber(); + var internal_hash_files_1 = require_internal_hash_files(); function create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports2.create = create; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js -var require_io_util3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs13.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path12.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path12.dirname(filePath); - const upperName = path12.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js -var require_io3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path12 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util3()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path12.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path12.join(dest, path12.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path12.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path12.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path12.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + function hashFiles(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter2(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; } + const globber = yield create(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } + exports2.hashFiles = hashFiles; } }); @@ -32561,7 +34834,7 @@ var require_constants7 = __commonJS({ var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -32574,21 +34847,31 @@ var require_cacheUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -32615,7 +34898,7 @@ var require_cacheUtils = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + var __asyncValues2 = exports2 && exports2.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { @@ -32635,20 +34918,29 @@ var require_cacheUtils = __commonJS({ } }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); - var exec = __importStar4(require_exec()); - var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io3()); - var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - var semver8 = __importStar4(require_semver3()); - var util = __importStar4(require("util")); + exports2.createTempDirectory = createTempDirectory; + exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; + exports2.resolvePaths = resolvePaths; + exports2.unlinkFile = unlinkFile; + exports2.getCompressionMethod = getCompressionMethod; + exports2.getCacheFileName = getCacheFileName; + exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; + exports2.assertDefined = assertDefined; + exports2.getCacheVersion = getCacheVersion; + exports2.getRuntimeToken = getRuntimeToken; + var core14 = __importStar2(require_core()); + var exec = __importStar2(require_exec()); + var glob = __importStar2(require_glob()); + var io6 = __importStar2(require_io()); + var crypto2 = __importStar2(require("crypto")); + var fs13 = __importStar2(require("fs")); + var path12 = __importStar2(require("path")); + var semver8 = __importStar2(require_semver3()); + var util = __importStar2(require("util")); var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { @@ -32664,27 +34956,25 @@ var require_cacheUtils = __commonJS({ } tempDirectory = path12.join(baseLocation, "actions", "temp"); } - const dest = path12.join(tempDirectory, crypto.randomUUID()); + const dest = path12.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } - exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs13.statSync(filePath).size; } - exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { - var _a, e_1, _b, _c; - var _d; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a, e_1, _b, _c; + var _d; const paths = []; const workspace = (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + for (var _e = true, _f = __asyncValues2(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { _c = _g.value; _e = false; const file = _c; @@ -32708,15 +34998,13 @@ var require_cacheUtils = __commonJS({ return paths; }); } - exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs13.unlink)(filePath); }); } - exports2.unlinkFile = unlinkFile; - function getVersion(app, additionalArgs = []) { - return __awaiter4(this, void 0, void 0, function* () { + function getVersion(app_1) { + return __awaiter2(this, arguments, void 0, function* (app, additionalArgs = []) { let versionOutput = ""; additionalArgs.push("--version"); core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); @@ -32738,7 +35026,7 @@ var require_cacheUtils = __commonJS({ }); } function getCompressionMethod() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); core14.debug(`zstd version: ${version}`); @@ -32749,13 +35037,11 @@ var require_cacheUtils = __commonJS({ } }); } - exports2.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } - exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs13.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } @@ -32763,14 +35049,12 @@ var require_cacheUtils = __commonJS({ return versionOutput.toLowerCase().includes("gnu tar") ? io6.which("tar") : ""; }); } - exports2.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } - exports2.assertDefined = assertDefined; function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { const components = paths.slice(); if (compressionMethod) { @@ -32780,9 +35064,8 @@ var require_cacheUtils = __commonJS({ components.push("windows-only"); } components.push(versionSalt); - return crypto.createHash("sha256").update(components.join("|")).digest("hex"); + return crypto2.createHash("sha256").update(components.join("|")).digest("hex"); } - exports2.getCacheVersion = getCacheVersion; function getRuntimeToken() { const token = process.env["ACTIONS_RUNTIME_TOKEN"]; if (!token) { @@ -32790,1772 +35073,10 @@ var require_cacheUtils = __commonJS({ } return token; } - exports2.getRuntimeToken = getRuntimeToken; } }); -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl; - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass; - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js -var require_lib3 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy3()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl; - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve6(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve6(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve6(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve6(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve6(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js -var require_auth2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter4(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js -var require_pipeline = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createEmptyPipeline = createEmptyPipeline; - var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); - var HttpPipeline = class _HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = void 0; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); - } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); - } - this._policies.push({ - policy, - options - }); - this._orderedPolicies = void 0; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { - removedPolicies.push(policyDescriptor.policy); - return false; - } else { - return true; - } - }); - this._orderedPolicies = void 0; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); - } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); - } - return this._orderedPolicies; - } - clone() { - return new _HttpPipeline(this._policies); - } - static create() { - return new _HttpPipeline(); - } - orderPolicies() { - const result = []; - const policyMap = /* @__PURE__ */ new Map(); - function createPhase(name) { - return { - name, - policies: /* @__PURE__ */ new Set(), - hasRun: false, - hasAfterPolicies: false - }; - } - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } else if (phase === "Serialize") { - return serializePhase; - } else if (phase === "Deserialize") { - return deserializePhase; - } else if (phase === "Sign") { - return signPhase; - } else { - return noPhase; - } - } - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: /* @__PURE__ */ new Set(), - dependants: /* @__PURE__ */ new Set() - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - continue; - } - if (node.dependsOn.size === 0) { - result.push(node.policy); - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } - } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - walkPhase(noPhase); - } - return; - } - if (phase.hasAfterPolicies) { - walkPhase(noPhase); - } - } - } - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - walkPhases(); - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } - } - return result; - } - }; - function createEmptyPipeline() { - return HttpPipeline.create(); - } - } -}); - -// node_modules/@azure/logger/dist/index.js -var require_dist = __commonJS({ - "node_modules/@azure/logger/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var os3 = require("os"); - var util = require("util"); - function _interopDefaultLegacy(e) { - return e && typeof e === "object" && "default" in e ? e : { "default": e }; - } - var util__default = /* @__PURE__ */ _interopDefaultLegacy(util); - function log(message, ...args) { - process.stderr.write(`${util__default["default"].format(message, ...args)}${os3.EOL}`); - } - var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; - var enabledString; - var enabledNamespaces = []; - var skippedNamespaces = []; - var debuggers = []; - if (debugEnvVariable) { - enable(debugEnvVariable); - } - var debugObj = Object.assign((namespace) => { - return createDebugger(namespace); - }, { - enable, - enabled, - disable, - log - }); - function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } - } - function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; - } - function disable() { - const result = enabledString || ""; - enable(""); - return result; - } - function createDebugger(namespace) { - const newDebugger = Object.assign(debug7, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend: extend3 - }); - function debug7(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; - } - function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; - } - function extend3(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; - } - var debug6 = debugObj; - var registeredLoggers = /* @__PURE__ */ new Set(); - var logLevelFromEnv = typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL || void 0; - var azureLogLevel; - var AzureLogger = debug6("azure"); - AzureLogger.log = (...args) => { - debug6.log(...args); - }; - var AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; - if (logLevelFromEnv) { - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } - } - function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces2 = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces2.push(logger.namespace); - } - } - debug6.enable(enabledNamespaces2.join(",")); - } - function getLogLevel() { - return azureLogLevel; - } - var levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100 - }; - function createClientLogger(namespace) { - const clientRootLogger = AzureLogger.extend(namespace); - patchLogMethod(AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose") - }; - } - function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; - } - function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces2 = debug6.disable(); - debug6.enable(enabledNamespaces2 + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; - } - function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); - } - function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); - } - exports2.AzureLogger = AzureLogger; - exports2.createClientLogger = createClientLogger; - exports2.getLogLevel = getLogLevel; - exports2.setLogLevel = setLogLevel; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js -var require_log = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logger = void 0; - var logger_1 = require_dist(); - exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - exports2.AbortError = AbortError; - } -}); - -// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs = __commonJS({ - "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); - } -}); - -// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js -var require_createAbortablePromise = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createAbortablePromise = createAbortablePromise; - var abort_controller_1 = require_commonjs(); - function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve6, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve6(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/random.js -var require_random = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/random.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; - function getRandomIntegerInclusive(min, max) { - min = Math.ceil(min); - max = Math.floor(max); - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/delay.js -var require_delay = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.calculateRetryDelay = calculateRetryDelay; - var createAbortablePromise_js_1 = require_createAbortablePromise(); - var random_js_1 = require_random(); - var StandardAbortMessage = "The delay was aborted."; - function delay2(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { - token = setTimeout(resolve6, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage - }); - } - function calculateRetryDelay(retryAttempt, config) { - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js -var require_aborterUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.cancelablePromiseRace = cancelablePromiseRace; - async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/object.js -var require_object = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/object.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isObject = isObject2; - function isObject2(input) { - return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/error.js -var require_error = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isError = isError; - exports2.getErrorMessage = getErrorMessage2; - var object_js_1 = require_object(); - function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; - } - function getErrorMessage2(e) { - if (isError(e)) { - return e.message; - } else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } else { - stringified = String(e); - } - } catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; - } - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/sha256.js -var require_sha256 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/sha256.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.computeSha256Hmac = computeSha256Hmac; - exports2.computeSha256Hash = computeSha256Hash; - var crypto_1 = require("crypto"); - async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); - } - async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/typeGuards.js -var require_typeGuards = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isDefined = isDefined2; - exports2.isObjectWithProperties = isObjectWithProperties; - exports2.objectHasProperty = objectHasProperty; - function isDefined2(thing) { - return typeof thing !== "undefined" && thing !== null; - } - function isObjectWithProperties(thing, properties) { - if (!isDefined2(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; - } - function objectHasProperty(thing, property) { - return isDefined2(thing) && typeof thing === "object" && property in thing; - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/uuidUtils.js -var require_uuidUtils = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/uuidUtils.js"(exports2) { - "use strict"; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.randomUUID = randomUUID2; - var crypto_1 = require("crypto"); - var uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" ? globalThis.crypto.randomUUID.bind(globalThis.crypto) : crypto_1.randomUUID; - function randomUUID2() { - return uuidFunction(); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js -var require_checkEnvironment = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/checkEnvironment.js"(exports2) { - "use strict"; - var _a; - var _b; - var _c; - var _d; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isReactNative = exports2.isNodeRuntime = exports2.isNode = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; - exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; - exports2.isWebWorker = typeof self === "object" && typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); - exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; - exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; - exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); - exports2.isNode = exports2.isNodeLike; - exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; - exports2.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; - } -}); - -// node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js -var require_bytesEncoding = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/bytesEncoding.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uint8ArrayToString = uint8ArrayToString; - exports2.stringToUint8Array = stringToUint8Array; - function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); - } - function stringToUint8Array(value, format) { - return Buffer.from(value, format); - } - } -}); - -// node_modules/@azure/core-util/dist/commonjs/index.js -var require_commonjs2 = __commonJS({ - "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.stringToUint8Array = exports2.uint8ArrayToString = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.getErrorMessage = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.createAbortablePromise = exports2.cancelablePromiseRace = exports2.calculateRetryDelay = exports2.delay = void 0; - var delay_js_1 = require_delay(); - Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { - return delay_js_1.delay; - } }); - Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { - return delay_js_1.calculateRetryDelay; - } }); - var aborterUtils_js_1 = require_aborterUtils(); - Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { - return aborterUtils_js_1.cancelablePromiseRace; - } }); - var createAbortablePromise_js_1 = require_createAbortablePromise(); - Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { - return createAbortablePromise_js_1.createAbortablePromise; - } }); - var random_js_1 = require_random(); - Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { - return random_js_1.getRandomIntegerInclusive; - } }); - var object_js_1 = require_object(); - Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { - return object_js_1.isObject; - } }); - var error_js_1 = require_error(); - Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { - return error_js_1.isError; - } }); - Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { - return error_js_1.getErrorMessage; - } }); - var sha256_js_1 = require_sha256(); - Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hash; - } }); - Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { - return sha256_js_1.computeSha256Hmac; - } }); - var typeGuards_js_1 = require_typeGuards(); - Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { - return typeGuards_js_1.isDefined; - } }); - Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { - return typeGuards_js_1.isObjectWithProperties; - } }); - Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { - return typeGuards_js_1.objectHasProperty; - } }); - var uuidUtils_js_1 = require_uuidUtils(); - Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { - return uuidUtils_js_1.randomUUID; - } }); - var checkEnvironment_js_1 = require_checkEnvironment(); - Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBrowser; - } }); - Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { - return checkEnvironment_js_1.isBun; - } }); - Object.defineProperty(exports2, "isNode", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNode; - } }); - Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeLike; - } }); - Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { - return checkEnvironment_js_1.isNodeRuntime; - } }); - Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { - return checkEnvironment_js_1.isDeno; - } }); - Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { - return checkEnvironment_js_1.isReactNative; - } }); - Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { - return checkEnvironment_js_1.isWebWorker; - } }); - var bytesEncoding_js_1 = require_bytesEncoding(); - Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { - return bytesEncoding_js_1.uint8ArrayToString; - } }); - Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { - return bytesEncoding_js_1.stringToUint8Array; - } }); - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js -var require_sanitizer = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/sanitizer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Sanitizer = void 0; - var core_util_1 = require_commonjs2(); - var RedactedString = "REDACTED"; - var defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate" - ]; - var defaultAllowedQueryParameters = ["api-version"]; - var Sanitizer = class { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = /* @__PURE__ */ new Set(); - return JSON.stringify(obj, (key, value) => { - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } else if (key === "url") { - return this.sanitizeUrl(value); - } else if (key === "query") { - return this.sanitizeQuery(value); - } else if (key === "body") { - return void 0; - } else if (key === "response") { - return void 0; - } else if (key === "operationSpec") { - return void 0; - } else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url2 = new URL(value); - if (!url2.search) { - return value; - } - for (const [key] of url2.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url2.searchParams.set(key, RedactedString); - } - } - return url2.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } else { - sanitized[k] = RedactedString; - } - } - return sanitized; - } - }; - exports2.Sanitizer = Sanitizer; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js -var require_logPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.logPolicyName = void 0; - exports2.logPolicy = logPolicy; - var log_js_1 = require_log(); - var sanitizer_js_1 = require_sanitizer(); - exports2.logPolicyName = "logPolicy"; - function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters - }); - return { - name: exports2.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js -var require_redirectPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.redirectPolicyName = void 0; - exports2.redirectPolicy = redirectPolicy; - exports2.redirectPolicyName = "redirectPolicy"; - var allowedRedirect = ["GET", "HEAD"]; - function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports2.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - } - }; - } - async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - 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 url2 = new URL(locationHeader, request.url); - request.url = url2.toString(); - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs +// node_modules/tslib/tslib.es6.mjs var tslib_es6_exports = {}; __export(tslib_es6_exports, { __addDisposableResource: () => __addDisposableResource, @@ -34583,6 +35104,7 @@ __export(tslib_es6_exports, { __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, + __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, @@ -34907,7 +35429,7 @@ function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); } __setModuleDefault(result, mod); return result; @@ -34983,9 +35505,17 @@ function __disposeResources(env) { } return next(); } -var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default; +function __rewriteRelativeImportExtension(path12, preserveJsx) { + if (typeof path12 === "string" && /^\.\.?\//.test(path12)) { + return path12.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; + }); + } + return path12; +} +var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ - "node_modules/@azure/core-rest-pipeline/node_modules/tslib/tslib.es6.mjs"() { + "node_modules/tslib/tslib.es6.mjs"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; @@ -34995,7 +35525,7 @@ var init_tslib_es6 = __esm({ return extendStatics(d, b); }; __assign = function() { - __assign = Object.assign || function __assign4(t) { + __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; @@ -35022,6 +35552,14 @@ var init_tslib_es6 = __esm({ }) : function(o, v) { o["default"] = v; }; + ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; @@ -35032,6 +35570,10 @@ var init_tslib_es6 = __esm({ __rest, __decorate, __param, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, __metadata, __awaiter, __generator, @@ -35053,400 +35595,15 @@ var init_tslib_es6 = __esm({ __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, - __disposeResources + __disposeResources, + __rewriteRelativeImportExtension }; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js -var require_userAgentPlatform = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getHeaderName = getHeaderName; - exports2.setPlatformSpecificData = setPlatformSpecificData; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var os3 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); - function getHeaderName() { - return "User-Agent"; - } - async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; - if (versions.bun) { - map2.set("Bun", versions.bun); - } else if (versions.deno) { - map2.set("Deno", versions.deno); - } else if (versions.node) { - map2.set("Node", versions.node); - } - } - map2.set("OS", `(${os3.arch()}-${os3.type()}-${os3.release()})`); - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants8 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; - exports2.SDK_VERSION = "1.17.0"; - exports2.DEFAULT_RETRY_POLICY_COUNT = 3; - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js -var require_userAgent = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentHeaderName = getUserAgentHeaderName; - exports2.getUserAgentValue = getUserAgentValue; - var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants8(); - function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); - } - return parts.join(" "); - } - function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); - } - async function getUserAgentValue(prefix) { - const runtimeInfo = /* @__PURE__ */ new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js -var require_userAgentPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.userAgentPolicyName = void 0; - exports2.userAgentPolicy = userAgentPolicy; - var userAgent_js_1 = require_userAgent(); - var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); - exports2.userAgentPolicyName = "userAgentPolicy"; - function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports2.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js -var require_typeGuards2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/typeGuards.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isNodeReadableStream = isNodeReadableStream; - exports2.isWebReadableStream = isWebReadableStream; - exports2.isReadableStream = isReadableStream; - exports2.isBlob = isBlob; - function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); - } - function isWebReadableStream(x) { - return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); - } - function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); - } - function isBlob(x) { - return typeof x.stream === "function"; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js -var require_file2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getRawContent = getRawContent; - exports2.createFileFromStream = createFileFromStream; - exports2.createFile = createFile; - var core_util_1 = require_commonjs2(); - var typeGuards_js_1 = require_typeGuards2(); - var unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - } - }; - var rawContent = /* @__PURE__ */ Symbol("rawContent"); - function hasRawContent(x) { - return typeof x[rawContent] === "function"; - } - function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); - } else { - return blob.stream(); - } - } - function createFileFromStream(stream2, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream2(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream2 }); - } - function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } else { - return new File([content], name, options); - } - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js -var require_concat = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/concat.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.concat = concat; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var node_stream_1 = require("node:stream"); - var typeGuards_js_1 = require_typeGuards2(); - var file_js_1 = require_file2(); - function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } finally { - reader.releaseLock(); - } - }); - } - function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } - } - function ensureNodeStream(stream2) { - if (stream2 instanceof ReadableStream) { - makeAsyncIterable(stream2); - return node_stream_1.Readable.fromWeb(stream2); - } else { - return stream2; - } - } - function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } else { - return ensureNodeStream(source); - } - } - async function concat(sources) { - return function() { - const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); - return node_stream_1.Readable.from((function() { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream2 of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream2)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } finally { - if (e_1) throw e_1.error; - } - } - } - }); - })()); - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js -var require_multipartPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.multipartPolicyName = void 0; - exports2.multipartPolicy = multipartPolicy; - var core_util_1 = require_commonjs2(); - var concat_js_1 = require_concat(); - var typeGuards_js_1 = require_typeGuards2(); - function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; - } - function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r -`; - } - return result; - } - function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } else if ((0, typeGuards_js_1.isBlob)(source)) { - return source.size === -1 ? void 0 : source.size; - } else { - return void 0; - } - } - function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === void 0) { - return void 0; - } else { - total += partLength; - } - } - return total; - } - async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r ---${boundary}`, "utf-8") - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8") - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); - } - exports2.multipartPolicyName = "multipartPolicy"; - var maxBoundaryLength = 70; - var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); - function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } - } - function multipartPolicy() { - return { - name: exports2.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : boundary = parsedBoundary; - if (boundary) { - assertValidBoundary(boundary); - } else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = void 0; - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js -var require_decompressResponsePolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decompressResponsePolicyName = void 0; - exports2.decompressResponsePolicy = decompressResponsePolicy; - exports2.decompressResponsePolicyName = "decompressResponsePolicy"; - function decompressResponsePolicy() { - return { - name: exports2.decompressResponsePolicyName, - async sendRequest(request, next) { - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js -var require_AbortError2 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js +var require_AbortError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/abort-controller/AbortError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AbortError = void 0; @@ -35460,295 +35617,297 @@ var require_AbortError2 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs3 = __commonJS({ - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js +var require_log = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbortError = void 0; - var AbortError_js_1 = require_AbortError2(); - Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { - return AbortError_js_1.AbortError; - } }); + exports2.log = log; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = require("node:os"); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js -var require_helpers = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/helpers.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js +var require_debug2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/debug.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.delay = delay2; - exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; - var abort_controller_1 = require_commonjs3(); - var StandardAbortMessage = "The operation was aborted."; - function delay2(delayInMs, value, options) { - return new Promise((resolve6, reject) => { - let timer = void 0; - let onAborted = void 0; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); + var log_js_1 = require_log(); + var debugEnvVariable = typeof process !== "undefined" && process.env && process.env.DEBUG || void 0; + var enabledString; + var enabledNamespaces = []; + var skippedNamespaces = []; + var debuggers = []; + if (debugEnvVariable) { + enable(debugEnvVariable); + } + var debugObj = Object.assign((namespace) => { + return createDebugger(namespace); + }, { + enable, + enabled, + disable, + log: log_js_1.log + }); + function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); + } else { + enabledNamespaces.push(ns); } - timer = setTimeout(() => { - removeListeners(); - resolve6(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } + } + function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; + } + function namespaceMatches(namespace, patternToMatch) { + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + return true; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else if (pattern[patternIndex] === namespace[namespaceIndex]) { + patternIndex++; + namespaceIndex++; + } else if (lastWildcard >= 0) { + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + if (namespaceIndex === namespaceLength) { + return false; + } + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; + } else { + return false; + } + } + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); + } + function disable() { + const result = enabledString || ""; + enable(""); + return result; + } + function createDebugger(namespace) { + const newDebugger = Object.assign(debug6, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend: extend3 }); - } - function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js -var require_throttlingRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; - exports2.throttlingRetryStrategy = throttlingRetryStrategy; - var helpers_js_1 = require_helpers(); - var RetryAfterHeader = "Retry-After"; - var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; - function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return void 0; - try { - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; - return retryAfterValue * multiplyingFactor; - } - } - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) + function debug6(...args) { + if (!newDebugger.enabled) { return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - return Number.isFinite(diff) ? Math.max(0, diff) : void 0; - } catch (_a) { - return void 0; + } + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; + } + newDebugger.log(...args); } + debuggers.push(newDebugger); + return newDebugger; } - function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); - } - function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs - }; - } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js -var require_exponentialRetryStrategy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.exponentialRetryStrategy = exponentialRetryStrategy; - exports2.isExponentialRetryResponse = isExponentialRetryResponse; - exports2.isSystemError = isSystemError; - var core_util_1 = require_commonjs2(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; - var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; - function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - let retryAfterInMs = retryInterval; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount); - const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay); - retryAfterInMs = clampedExponentialDelay / 2 + (0, core_util_1.getRandomIntegerInclusive)(0, clampedExponentialDelay / 2); - return { retryAfterInMs }; - } - }; - } - function isExponentialRetryResponse(response) { - return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); - } - function isSystemError(err) { - if (!err) { - return false; + function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); + return true; } - return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + return false; } + function extend3(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; + } + exports2.default = debugObj; } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js -var require_retryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js +var require_logger = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/logger.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryPolicy = retryPolicy; - var helpers_js_1 = require_helpers(); - var logger_1 = require_dist(); - var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants8(); - var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); - var retryPolicyName = "retryPolicy"; - function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; - return { - name: retryPolicyName, - async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = void 0; - responseError = void 0; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } else if (response) { - return response; - } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } + exports2.TypeSpecRuntimeLogger = void 0; + exports2.createLoggerContext = createLoggerContext; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var debug_js_1 = tslib_1.__importDefault(require_debug2()); + var TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; + var levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100 + }; + function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; + } + function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); + } + function createLoggerContext(options) { + const registeredLoggers = /* @__PURE__ */ new Set(); + const logLevelFromEnv = typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName] || void 0; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } } - }; - } - } -}); - -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js -var require_defaultRetryPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultRetryPolicyName = void 0; - exports2.defaultRetryPolicy = defaultRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.defaultRetryPolicyName = "defaultRetryPolicy"; - function defaultRetryPolicy(options = {}) { - var _a; + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); + } else { + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); + } + } + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); + } + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); + } + registeredLoggers.add(logger); + return logger; + } + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose") + }; + } return { - name: exports2.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger }; } + var context2 = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime" + }); + exports2.TypeSpecRuntimeLogger = context2.logger; + function setLogLevel(logLevel) { + context2.setLogLevel(logLevel); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js var require_httpHeaders = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/httpHeaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createHttpHeaders = createHttpHeaders; @@ -35761,6 +35920,7 @@ var require_httpHeaders = __commonJS({ } } var HttpHeadersImpl = class { + _headersMap; constructor(rawHeaders) { this._headersMap = /* @__PURE__ */ new Map(); if (rawHeaders) { @@ -35784,8 +35944,7 @@ var require_httpHeaders = __commonJS({ * @param name - The name of the header. This value is case-insensitive. */ get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; + return this._headersMap.get(normalizeName(name))?.value; } /** * Get whether or not this header collection contains a header entry for the provided header name. @@ -35836,21 +35995,1416 @@ var require_httpHeaders = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js +var require_schemes = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/schemes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js +var require_oauth2Flows = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/oauth2Flows.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js +var require_uuidUtils = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/uuidUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomUUID = randomUUID2; + function randomUUID2() { + return crypto.randomUUID(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js +var require_pipelineRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipelineRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineRequest = createPipelineRequest; + var httpHeaders_js_1 = require_httpHeaders(); + var uuidUtils_js_1 = require_uuidUtils(); + var PipelineRequestImpl = class { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } + }; + function createPipelineRequest(options) { + return new PipelineRequestImpl(options); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ValidPhaseNames = /* @__PURE__ */ new Set(["Deserialize", "Serialize", "Retry", "Sign"]); + var HttpPipeline = class _HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = void 0; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); + } + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options + }); + this._orderedPolicies = void 0; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if (options.name && policyDescriptor.policy.name === options.name || options.phase && policyDescriptor.options.phase === options.phase) { + removedPolicies.push(policyDescriptor.policy); + return false; + } else { + return true; + } + }); + this._orderedPolicies = void 0; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); + } + return this._orderedPolicies; + } + clone() { + return new _HttpPipeline(this._policies); + } + static create() { + return new _HttpPipeline(); + } + orderPolicies() { + const result = []; + const policyMap = /* @__PURE__ */ new Map(); + function createPhase(name) { + return { + name, + policies: /* @__PURE__ */ new Set(), + hasRun: false, + hasAfterPolicies: false + }; + } + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } else if (phase === "Serialize") { + return serializePhase; + } else if (phase === "Deserialize") { + return deserializePhase; + } else if (phase === "Sign") { + return signPhase; + } else { + return noPhase; + } + } + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: /* @__PURE__ */ new Set(), + dependants: /* @__PURE__ */ new Set() + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + continue; + } + if (node.dependsOn.size === 0) { + result.push(node.policy); + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + walkPhase(noPhase); + } + return; + } + if (phase.hasAfterPolicies) { + walkPhase(noPhase); + } + } + } + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + walkPhases(); + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; + } + }; + function createEmptyPipeline() { + return HttpPipeline.create(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js +var require_object = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/object.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isObject = isObject2; + function isObject2(input) { + return typeof input === "object" && input !== null && !Array.isArray(input) && !(input instanceof RegExp) && !(input instanceof Date); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js +var require_error = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isError = isError; + var object_js_1 = require_object(); + function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js +var require_inspect = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/inspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.custom = void 0; + var node_util_1 = require("node:util"); + exports2.custom = node_util_1.inspect.custom; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js +var require_sanitizer = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sanitizer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = void 0; + var object_js_1 = require_object(); + var RedactedString = "REDACTED"; + var defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate" + ]; + var defaultAllowedQueryParameters = ["api-version"]; + var Sanitizer = class { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [] } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = /* @__PURE__ */ new Set(); + return JSON.stringify(obj, (key, value) => { + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } else if (key === "url") { + return this.sanitizeUrl(value); + } else if (key === "query") { + return this.sanitizeQuery(value); + } else if (key === "body") { + return void 0; + } else if (key === "response") { + return void 0; + } else if (key === "operationSpec") { + return void 0; + } else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url2 = new URL(value); + if (!url2.search) { + return value; + } + for (const [key] of url2.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url2.searchParams.set(key, RedactedString); + } + } + return url2.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } + }; + exports2.Sanitizer = Sanitizer; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js +var require_restError = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RestError = void 0; + exports2.isRestError = isRestError; + var error_js_1 = require_error(); + var inspect_js_1 = require_inspect(); + var sanitizer_js_1 = require_sanitizer(); + var errorSanitizer = new sanitizer_js_1.Sanitizer(); + var RestError = class _RestError extends Error { + /** + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. + */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; + /** + * This means that parsing the response from the server failed. + * It may have been malformed. + */ + static PARSE_ERROR = "PARSE_ERROR"; + /** + * The code of the error itself (use statics on RestError if possible.) + */ + code; + /** + * The HTTP status code of the request (if applicable.) + */ + statusCode; + /** + * The request that was made. + * This property is non-enumerable. + */ + request; + /** + * The response received (if any.) + * This property is non-enumerable. + */ + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + const agent = this.request?.agent ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets + } : void 0; + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + return `RestError: ${this.message} + ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response + })}`; + }, + enumerable: false + }); + Object.setPrototypeOf(this, _RestError.prototype); + } + }; + exports2.RestError = RestError; + function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js +var require_bytesEncoding = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/bytesEncoding.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); + } + function stringToUint8Array(value, format) { + return Buffer.from(value, format); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js +var require_log2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_js_1 = require_logger(); + exports2.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js +var require_nodeHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/nodeHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyLength = getBodyLength; + exports2.createNodeHttpClient = createNodeHttpClient; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_http_1 = tslib_1.__importDefault(require("node:http")); + var node_https_1 = tslib_1.__importDefault(require("node:https")); + var node_zlib_1 = tslib_1.__importDefault(require("node:zlib")); + var node_stream_1 = require("node:stream"); + var AbortError_js_1 = require_AbortError(); + var httpHeaders_js_1 = require_httpHeaders(); + var restError_js_1 = require_restError(); + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + var DEFAULT_TLS_SETTINGS = {}; + function isReadableStream(body) { + return body && typeof body.pipe === "function"; + } + function isStreamComplete(stream2) { + if (stream2.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve6) => { + const handler = () => { + resolve6(); + stream2.removeListener("close", handler); + stream2.removeListener("end", handler); + stream2.removeListener("error", handler); + }; + stream2.on("close", handler); + stream2.on("end", handler); + stream2.on("error", handler); + }); + } + function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; + } + var ReportTransform = class extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } + }; + var NodeHttpClient = class { + cachedHttpAgent; + cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); + /** + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. + */ + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); + } + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); + } + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } + } + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== void 0) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request + }; + if (request.method === "HEAD") { + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || request.streamResponseStatusCodes?.has(response.status) + ) { + response.readableStreamBody = responseStream; + } else { + response.bodyAsText = await streamToText(responseStream); + } + return response; + } finally { + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }).catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } + } + } + makeRequest(request, abortController, body) { + 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 = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides + }; + return new Promise((resolve6, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve6) : node_https_1.default.request(options, resolve6); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } else { + req.end(); + } + }); + } + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + if (isInsecure) { + if (disableKeepAlive) { + return node_http_1.default.globalAgent; + } + if (!this.cachedHttpAgent) { + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); + } + return this.cachedHttpAgent; + } else { + if (disableKeepAlive && !request.tlsSettings) { + return node_https_1.default.globalAgent; + } + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; + } + } + }; + function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); + } + } else if (value) { + headers.set(header, value); + } + } + return headers; + } + function getDecodedResponseStream(stream2, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream2.pipe(unzip); + return unzip; + } else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream2.pipe(inflate); + return inflate; + } + return stream2; + } + function streamToText(stream2) { + return new Promise((resolve6, reject) => { + const buffer = []; + stream2.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); + } else { + buffer.push(Buffer.from(chunk)); + } + }); + stream2.on("end", () => { + resolve6(Buffer.concat(buffer).toString("utf8")); + }); + stream2.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR + })); + } + }); + }); + } + function getBodyLength(body) { + if (!body) { + return 0; + } else if (Buffer.isBuffer(body)) { + return body.length; + } else if (isReadableStream(body)) { + return null; + } else if (isArrayBuffer(body)) { + return body.byteLength; + } else if (typeof body === "string") { + return Buffer.from(body).length; + } else { + return null; + } + } + function createNodeHttpClient() { + return new NodeHttpClient(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js +var require_defaultHttpClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/defaultHttpClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultHttpClient = createDefaultHttpClient; + var nodeHttpClient_js_1 = require_nodeHttpClient(); + function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js +var require_logPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log2(); + var sanitizer_js_1 = require_sanitizer(); + exports2.logPolicyName = "logPolicy"; + function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters + }); + return { + name: exports2.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); + } + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + exports2.redirectPolicyName = "redirectPolicy"; + var allowedRedirect = ["GET", "HEAD"]; + function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports2.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + } + }; + } + async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + 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 url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js +var require_constants8 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "0.3.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js +var require_userAgent = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform(); + var constants_js_1 = require_constants8(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + exports2.decompressResponsePolicyName = "decompressResponsePolicy"; + function decompressResponsePolicy() { + return { + name: exports2.decompressResponsePolicyName, + async sendRequest(request, next) { + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js +var require_random = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/random.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + function getRandomIntegerInclusive(min, max) { + min = Math.ceil(min); + max = Math.floor(max); + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js +var require_delay = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.calculateRetryDelay = calculateRetryDelay; + var random_js_1 = require_random(); + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js +var require_helpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/helpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.parseHeaderValueAsNumber = parseHeaderValueAsNumber; + var AbortError_js_1 = require_AbortError(); + var StandardAbortMessage = "The operation was aborted."; + function delay2(delayInMs, value, options) { + return new Promise((resolve6, reject) => { + let timer = void 0; + let onAborted = void 0; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve6(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); + } + function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js +var require_throttlingRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/throttlingRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isThrottlingRetryResponse = isThrottlingRetryResponse; + exports2.throttlingRetryStrategy = throttlingRetryStrategy; + var helpers_js_1 = require_helpers(); + var RetryAfterHeader = "Retry-After"; + var AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; + function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return void 0; + try { + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + const multiplyingFactor = header === RetryAfterHeader ? 1e3 : 1; + return retryAfterValue * multiplyingFactor; + } + } + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + return Number.isFinite(diff) ? Math.max(0, diff) : void 0; + } catch { + return void 0; + } + } + function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); + } + function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs + }; + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js +var require_exponentialRetryStrategy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/retryStrategies/exponentialRetryStrategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryStrategy = exponentialRetryStrategy; + exports2.isExponentialRetryResponse = isExponentialRetryResponse; + exports2.isSystemError = isSystemError; + var delay_js_1 = require_delay(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var DEFAULT_CLIENT_RETRY_INTERVAL = 1e3; + var DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1e3 * 64; + function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; + } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval + }); + } + }; + } + function isExponentialRetryResponse(response) { + return Boolean(response && response.status !== void 0 && (response.status >= 500 || response.status === 408) && response.status !== 501 && response.status !== 505); + } + function isSystemError(err) { + if (!err) { + return false; + } + return err.code === "ETIMEDOUT" || err.code === "ESOCKETTIMEDOUT" || err.code === "ECONNREFUSED" || err.code === "ECONNRESET" || err.code === "ENOENT" || err.code === "ENOTFOUND"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var helpers_js_1 = require_helpers(); + var AbortError_js_1 = require_AbortError(); + var logger_js_1 = require_logger(); + var constants_js_1 = require_constants8(); + var retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); + var retryPolicyName = "retryPolicy"; + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = void 0; + responseError = void 0; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } else if (response) { + return response; + } else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, void 0, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.defaultRetryPolicyName = "defaultRetryPolicy"; + function defaultRetryPolicy(options = {}) { + return { + name: exports2.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js +var require_checkEnvironment = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/checkEnvironment.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isDeno = exports2.isWebWorker = exports2.isBrowser = void 0; + exports2.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; + exports2.isWebWorker = typeof self === "object" && typeof self?.importScripts === "function" && (self.constructor?.name === "DedicatedWorkerGlobalScope" || self.constructor?.name === "ServiceWorkerGlobalScope" || self.constructor?.name === "SharedWorkerGlobalScope"); + exports2.isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined"; + exports2.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; + exports2.isNodeLike = typeof globalThis.process !== "undefined" && Boolean(globalThis.process.version) && Boolean(globalThis.process.versions?.node); + exports2.isNodeRuntime = exports2.isNodeLike && !exports2.isBun && !exports2.isDeno; + exports2.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js var require_formDataPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/formDataPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.formDataPolicyName = void 0; exports2.formDataPolicy = formDataPolicy; - var core_util_1 = require_commonjs2(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkEnvironment_js_1 = require_checkEnvironment(); var httpHeaders_js_1 = require_httpHeaders(); exports2.formDataPolicyName = "formDataPolicy"; function formDataToFormDataMap(formData) { - var _a; const formDataMap = {}; for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : formDataMap[key] = []; + formDataMap[key] ??= []; formDataMap[key].push(value); } return formDataMap; @@ -35859,7 +37413,7 @@ var require_formDataPolicy = __commonJS({ return { name: exports2.formDataPolicyName, async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { request.formData = formDataToFormDataMap(request.body); request.body = void 0; } @@ -35894,7 +37448,7 @@ var require_formDataPolicy = __commonJS({ if (contentType && !contentType.startsWith("multipart/form-data")) { return; } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); const parts = []; for (const [fieldName, values] of Object.entries(formData)) { for (const value of Array.isArray(values) ? values : [values]) { @@ -35903,7 +37457,7 @@ var require_formDataPolicy = __commonJS({ headers: (0, httpHeaders_js_1.createHttpHeaders)({ "Content-Disposition": `form-data; name="${fieldName}"` }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8") + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8") }); } else if (value === void 0 || value === null || typeof value !== "object") { throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); @@ -35933,16 +37487,16 @@ var require_ms = __commonJS({ var d = h * 24; var w = d * 7; var y = d * 365.25; - module2.exports = function(val2, options) { + module2.exports = function(val, options) { options = options || {}; - var type2 = typeof val2; - if (type2 === "string" && val2.length > 0) { - return parse(val2); - } else if (type2 === "number" && isFinite(val2)) { - return options.long ? fmtLong(val2) : fmtShort(val2); + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse(val); + } else if (type2 === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); } throw new Error( - "val is not a non-empty string or a valid number. val=" + JSON.stringify(val2) + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str2) { @@ -36095,8 +37649,8 @@ var require_common = __commonJS({ index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { - const val2 = args[index]; - match = formatter.call(self2, val2); + const val = args[index]; + match = formatter.call(self2, val); args.splice(index, 1); index--; } @@ -36201,11 +37755,11 @@ var require_common = __commonJS({ } return false; } - function coerce3(val2) { - if (val2 instanceof Error) { - return val2.stack || val2.message; + function coerce3(val) { + if (val instanceof Error) { + return val.stack || val.message; } - return val2; + return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); @@ -36609,17 +38163,17 @@ var require_node = __commonJS({ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); - let val2 = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val2)) { - val2 = true; - } else if (/^(no|off|false|disabled)$/i.test(val2)) { - val2 = false; - } else if (val2 === "null") { - val2 = null; + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - val2 = Number(val2); + val = Number(val); } - obj[prop] = val2; + obj[prop] = val; return obj; }, {}); function useColors() { @@ -36691,7 +38245,7 @@ var require_src = __commonJS({ var require_helpers2 = __commonJS({ "node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -36704,24 +38258,24 @@ var require_helpers2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.req = exports2.json = exports2.toBuffer = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); async function toBuffer(stream2) { let length = 0; const chunks = []; @@ -36758,10 +38312,10 @@ var require_helpers2 = __commonJS({ }); // node_modules/agent-base/dist/index.js -var require_dist2 = __commonJS({ +var require_dist = __commonJS({ "node_modules/agent-base/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -36774,29 +38328,29 @@ var require_dist2 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __exportStar4 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding4(exports3, m, p); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Agent = void 0; - var net = __importStar4(require("net")); - var http = __importStar4(require("http")); + var net = __importStar2(require("net")); + var http = __importStar2(require("http")); var https_1 = require("https"); - __exportStar4(require_helpers2(), exports2); + __exportStar2(require_helpers2(), exports2); var INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState"); var Agent = class extends http.Agent { constructor(opts) { @@ -36917,12 +38471,12 @@ var require_dist2 = __commonJS({ var require_parse_proxy_response = __commonJS({ "node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports2) { "use strict"; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; - var debug_1 = __importDefault4(require_src()); + var debug_1 = __importDefault2(require_src()); var debug6 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve6, reject) => { @@ -37010,10 +38564,10 @@ var require_parse_proxy_response = __commonJS({ }); // node_modules/https-proxy-agent/dist/index.js -var require_dist3 = __commonJS({ +var require_dist2 = __commonJS({ "node_modules/https-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -37026,30 +38580,30 @@ var require_dist3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpsProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var assert_1 = __importDefault4(require("assert")); - var debug_1 = __importDefault4(require_src()); - var agent_base_1 = require_dist2(); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var assert_1 = __importDefault2(require("assert")); + var debug_1 = __importDefault2(require_src()); + var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); var debug6 = (0, debug_1.default)("https-proxy-agent"); @@ -37160,10 +38714,10 @@ var require_dist3 = __commonJS({ }); // node_modules/http-proxy-agent/dist/index.js -var require_dist4 = __commonJS({ +var require_dist3 = __commonJS({ "node_modules/http-proxy-agent/dist/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -37176,30 +38730,30 @@ var require_dist4 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __importDefault4 = exports2 && exports2.__importDefault || function(mod) { + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpProxyAgent = void 0; - var net = __importStar4(require("net")); - var tls = __importStar4(require("tls")); - var debug_1 = __importDefault4(require_src()); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var debug_1 = __importDefault2(require_src()); var events_1 = require("events"); - var agent_base_1 = require_dist2(); + var agent_base_1 = require_dist(); var url_1 = require("url"); var debug6 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent = class extends agent_base_1.Agent { @@ -37289,18 +38843,18 @@ var require_dist4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js var require_proxyPolicy = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/proxyPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.globalNoProxyList = exports2.proxyPolicyName = void 0; exports2.loadNoProxy = loadNoProxy; exports2.getDefaultProxySettings = getDefaultProxySettings; exports2.proxyPolicy = proxyPolicy; - var https_proxy_agent_1 = require_dist3(); - var http_proxy_agent_1 = require_dist4(); - var log_js_1 = require_log(); + var https_proxy_agent_1 = require_dist2(); + var http_proxy_agent_1 = require_dist3(); + var log_js_1 = require_log2(); var HTTPS_PROXY = "HTTPS_PROXY"; var HTTP_PROXY = "HTTP_PROXY"; var ALL_PROXY = "ALL_PROXY"; @@ -37331,7 +38885,7 @@ var require_proxyPolicy = __commonJS({ return false; } const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { + if (bypassedMap?.has(host)) { return bypassedMap.get(host); } let isBypassedFlag = false; @@ -37350,7 +38904,7 @@ var require_proxyPolicy = __commonJS({ } } } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); + bypassedMap?.set(host, isBypassedFlag); return isBypassedFlag; } function loadNoProxy() { @@ -37385,7 +38939,7 @@ var require_proxyPolicy = __commonJS({ let parsedProxyUrl; try { parsedProxyUrl = new URL(settings.host); - } catch (_a) { + } catch { throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); } parsedProxyUrl.port = String(settings.port); @@ -37428,8 +38982,7 @@ var require_proxyPolicy = __commonJS({ return { name: exports2.proxyPolicyName, async sendRequest(request, next) { - var _a; - if (!request.proxySettings && defaultProxy && !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports2.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? void 0 : globalBypassedMap)) { + if (!request.proxySettings && defaultProxy && !isBypassed(request.url, options?.customNoProxyList ?? exports2.globalNoProxyList, options?.customNoProxyList ? void 0 : globalBypassedMap)) { setProxyAgentOnRequest(request, cachedAgents, defaultProxy); } else if (request.proxySettings) { setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); @@ -37441,6 +38994,2016 @@ var require_proxyPolicy = __commonJS({ } }); +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + exports2.agentPolicyName = "agentPolicy"; + function agentPolicy(agent) { + return { + name: exports2.agentPolicyName, + sendRequest: async (req, next) => { + if (!req.agent) { + req.agent = agent; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js +var require_tlsPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/tlsPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tlsPolicyName = void 0; + exports2.tlsPolicy = tlsPolicy; + exports2.tlsPolicyName = "tlsPolicy"; + function tlsPolicy(tlsSettings) { + return { + name: exports2.tlsPolicyName, + sendRequest: async (req, next) => { + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js +var require_typeGuards = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isNodeReadableStream = isNodeReadableStream; + exports2.isWebReadableStream = isWebReadableStream; + exports2.isBinaryBody = isBinaryBody; + exports2.isReadableStream = isReadableStream; + exports2.isBlob = isBlob; + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + function isWebReadableStream(x) { + return Boolean(x && typeof x.getReader === "function" && typeof x.tee === "function"); + } + function isBinaryBody(body) { + return body !== void 0 && (body instanceof Uint8Array || isReadableStream(body) || typeof body === "function" || body instanceof Blob); + } + function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); + } + function isBlob(x) { + return typeof x.stream === "function"; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js +var require_concat = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/concat.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.concat = concat; + var stream_1 = require("stream"); + var typeGuards_js_1 = require_typeGuards(); + async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } finally { + reader.releaseLock(); + } + } + function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } + } + function ensureNodeStream(stream2) { + if (stream2 instanceof ReadableStream) { + makeAsyncIterable(stream2); + return stream_1.Readable.fromWeb(stream2); + } else { + return stream2; + } + } + function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } else { + return ensureNodeStream(source); + } + } + async function concat(sources) { + return function() { + const streams = sources.map((x) => typeof x === "function" ? x() : x).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream2 of streams) { + for await (const chunk of stream2) { + yield chunk; + } + } + })()); + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + var uuidUtils_js_1 = require_uuidUtils(); + var concat_js_1 = require_concat(); + function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; + } + function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r +`; + } + return result; + } + function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } else if ((0, typeGuards_js_1.isBlob)(source)) { + return source.size === -1 ? void 0 : source.size; + } else { + return void 0; + } + } + function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === void 0) { + return void 0; + } else { + total += partLength; + } + } + return total; + } + async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r +--${boundary}`, "utf-8") + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8") + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); + } + exports2.multipartPolicyName = "multipartPolicy"; + var maxBoundaryLength = 70; + var validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); + function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } + } + function multipartPolicy() { + return { + name: exports2.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); + } + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = void 0; + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js +var require_createPipelineFromOptions = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/createPipelineFromOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createPipelineFromOptions = createPipelineFromOptions; + var logPolicy_js_1 = require_logPolicy(); + var pipeline_js_1 = require_pipeline(); + var redirectPolicy_js_1 = require_redirectPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy(); + var checkEnvironment_js_1 = require_checkEnvironment(); + var proxyPolicy_js_1 = require_proxyPolicy(); + var agentPolicy_js_1 = require_agentPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy(); + function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js +var require_apiVersionPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/apiVersionPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiVersionPolicyName = void 0; + exports2.apiVersionPolicy = apiVersionPolicy; + exports2.apiVersionPolicyName = "ApiVersionPolicy"; + function apiVersionPolicy(options) { + return { + name: exports2.apiVersionPolicyName, + sendRequest: (req, next) => { + const url2 = new URL(req.url); + if (!url2.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url2.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; + } + return next(req); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js +var require_credentials = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/auth/credentials.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isOAuth2TokenCredential = isOAuth2TokenCredential; + exports2.isBearerTokenCredential = isBearerTokenCredential; + exports2.isBasicCredential = isBasicCredential; + exports2.isApiKeyCredential = isApiKeyCredential; + function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; + } + function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; + } + function isBasicCredential(credential) { + return "username" in credential && "password" in credential; + } + function isApiKeyCredential(credential) { + return "key" in credential; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js +var require_checkInsecureConnection = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/checkInsecureConnection.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ensureSecureConnection = ensureSecureConnection; + var log_js_1 = require_log2(); + var insecureConnectionWarningEmmitted = false; + function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url2 = new URL(request.url); + if (url2.hostname === "localhost" || url2.hostname === "127.0.0.1") { + return true; + } + } + return false; + } + function emitInsecureConnectionWarning() { + const warning10 = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning10); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning10); + } + } + function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); + } else { + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); + } + } + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js +var require_apiKeyAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/apiKeyAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.apiKeyAuthenticationPolicyName = void 0; + exports2.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; + function apiKeyAuthenticationPolicy(options) { + return { + name: exports2.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js +var require_basicAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/basicAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.basicAuthenticationPolicyName = void 0; + exports2.basicAuthenticationPolicy = basicAuthenticationPolicy; + var bytesEncoding_js_1 = require_bytesEncoding(); + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function basicAuthenticationPolicy(options) { + return { + name: exports2.basicAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js +var require_bearerAuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/bearerAuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.bearerAuthenticationPolicyName = void 0; + exports2.bearerAuthenticationPolicy = bearerAuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; + function bearerAuthenticationPolicy(options) { + return { + name: exports2.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js +var require_oauth2AuthenticationPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/auth/oauth2AuthenticationPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.oauth2AuthenticationPolicyName = void 0; + exports2.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; + var checkInsecureConnection_js_1 = require_checkInsecureConnection(); + exports2.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; + function oauth2AuthenticationPolicy(options) { + return { + name: exports2.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js +var require_clientHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/clientHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDefaultPipeline = createDefaultPipeline; + exports2.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; + var defaultHttpClient_js_1 = require_defaultHttpClient(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var apiVersionPolicy_js_1 = require_apiVersionPolicy(); + var credentials_js_1 = require_credentials(); + var apiKeyAuthenticationPolicy_js_1 = require_apiKeyAuthenticationPolicy(); + var basicAuthenticationPolicy_js_1 = require_basicAuthenticationPolicy(); + var bearerAuthenticationPolicy_js_1 = require_bearerAuthenticationPolicy(); + var oauth2AuthenticationPolicy_js_1 = require_oauth2AuthenticationPolicy(); + var cachedHttpClient; + function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); + } + } + return pipeline; + } + function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); + } + return cachedHttpClient; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js +var require_multipart2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/multipart.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildBodyPart = buildBodyPart; + exports2.buildMultipartBody = buildMultipartBody; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var bytesEncoding_js_1 = require_bytesEncoding(); + var typeGuards_js_1 = require_typeGuards(); + function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; + } + } + return void 0; + } + function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; + } + if (descriptor.contentType === null) { + return void 0; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === void 0) { + return void 0; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + return "application/json"; + } + function escapeDispositionField(value) { + return JSON.stringify(value); + } + function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === void 0 && descriptor.name === void 0 && descriptor.filename === void 0) { + return void 0; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = void 0; + if (descriptor.filename) { + filename = descriptor.filename; + } else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; + } + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; + } + function normalizeBody(body, contentType) { + if (body === void 0) { + return new Uint8Array([]); + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); + } + function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body + }; + } + function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js +var require_sendRequest = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/sendRequest.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sendRequest = sendRequest; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + var pipelineRequest_js_1 = require_pipelineRequest(); + var clientHelpers_js_1 = require_clientHelpers(); + var typeGuards_js_1 = require_typeGuards(); + var multipart_js_1 = require_multipart2(); + async function sendRequest(method, url2, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url2, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream2 = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream2 !== void 0 ? void 0 : getResponseBody(response); + const body = stream2 ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); + } + return { + request, + headers, + status: `${response.status}`, + body + }; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + options?.onResponse({ ...response, request, rawHeaders }, e); + } + throw e; + } + } + function getRequestContentType(options = {}) { + return options.contentType ?? options.headers?.["content-type"] ?? getContentType(options.body); + } + function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; + } catch (error3) { + return void 0; + } + } + return "application/json"; + } + function buildPipelineRequest(method, url2, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== void 0 || multipartBody !== void 0; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...options.headers ? options.headers : {}, + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...hasContent && requestContentType && { + "content-type": requestContentType + } + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url: url2, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream ? /* @__PURE__ */ new Set([Number.POSITIVE_INFINITY]) : void 0 + }); + } + function getRequestBody(body, contentType = "") { + if (body === void 0) { + return { body: void 0 }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; + } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } + } + function getResponseBody(response) { + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + try { + return bodyToParse ? JSON.parse(bodyToParse) : void 0; + } catch (error3) { + if (firstType === "application/json") { + throw createParseError(response, error3); + } + return String(bodyToParse); + } + } + function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js +var require_urlHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/urlHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildRequestUrl = buildRequestUrl; + exports2.buildBaseUrl = buildBaseUrl; + exports2.replaceAll = replaceAll; + function isQueryParameterWithOptions(x) { + const value = x.value; + return value !== void 0 && value.toString !== void 0 && typeof value.toString === "function"; + } + function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url2 = new URL(requestUrl); + return url2.toString().replace(/([^:]\/)\/+/g, "$1"); + } + function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } else if (style === "spaceDelimited") { + separator = "%20"; + } else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } else if (typeof param === "object" && param.toString === Object.prototype.toString) { + paramValues = Object.entries(param).flat(); + } else { + paramValues = [param]; + } + const value = paramValues.map((p) => { + if (p === null || p === void 0) { + return ""; + } + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); + } + const rawValue = p.toISOString !== void 0 ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }).join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; + } + function appendQueryParams(url2, options = {}) { + if (!options.queryParameters) { + return url2; + } + const parsedUrl = new URL(url2); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === void 0 || param === null) { + continue; + } + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? param.explode ?? false : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); + } + } else if (typeof rawValue === "object") { + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); + } + } else { + throw new Error("explode can only be set to true for objects and arrays"); + } + } else { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); + } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); + } + function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === void 0 || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); + } + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== void 0 ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; + } + return endpoint; + } + function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); + } + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; + } + function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js +var require_getClient = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/getClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getClient = getClient; + var clientHelpers_js_1 = require_clientHelpers(); + var sendRequest_js_1 = require_sendRequest(); + var urlHelpers_js_1 = require_urlHelpers(); + var checkEnvironment_js_1 = require_checkEnvironment(); + function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + const afterPhase = position === "perRetry" ? "Sign" : void 0; + pipeline.addPolicy(policy, { + afterPhase + }); + } + } + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path12, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path12, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + } + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline + }; + } + function buildOperation(method, url2, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function(onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); + } else { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url2, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); + } else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); + } + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js +var require_operationOptionHelpers = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/operationOptionHelpers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.operationOptionsToRequestParameters = operationOptionsToRequestParameters; + function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js +var require_restError2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/client/restError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = createRestError; + var restError_js_1 = require_restError(); + var httpHeaders_js_1 = require_httpHeaders(); + function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" ? messageOrResponse : internalError?.message ?? `Unexpected status code: ${resp.status}`; + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp) + }); + } + function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1 + }; + } + function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? void 0 : status; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createRestError = exports2.operationOptionsToRequestParameters = exports2.getClient = exports2.createDefaultHttpClient = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isRestError = exports2.RestError = exports2.createEmptyPipeline = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.TypeSpecRuntimeLogger = exports2.setLogLevel = exports2.getLogLevel = exports2.createClientLogger = exports2.AbortError = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var AbortError_js_1 = require_AbortError(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createClientLogger", { enumerable: true, get: function() { + return logger_js_1.createClientLogger; + } }); + Object.defineProperty(exports2, "getLogLevel", { enumerable: true, get: function() { + return logger_js_1.getLogLevel; + } }); + Object.defineProperty(exports2, "setLogLevel", { enumerable: true, get: function() { + return logger_js_1.setLogLevel; + } }); + Object.defineProperty(exports2, "TypeSpecRuntimeLogger", { enumerable: true, get: function() { + return logger_js_1.TypeSpecRuntimeLogger; + } }); + var httpHeaders_js_1 = require_httpHeaders(); + Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { + return httpHeaders_js_1.createHttpHeaders; + } }); + tslib_1.__exportStar(require_schemes(), exports2); + tslib_1.__exportStar(require_oauth2Flows(), exports2); + var pipelineRequest_js_1 = require_pipelineRequest(); + Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { + return pipelineRequest_js_1.createPipelineRequest; + } }); + var pipeline_js_1 = require_pipeline(); + Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { + return pipeline_js_1.createEmptyPipeline; + } }); + var restError_js_1 = require_restError(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return restError_js_1.RestError; + } }); + Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { + return restError_js_1.isRestError; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var defaultHttpClient_js_1 = require_defaultHttpClient(); + Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { + return defaultHttpClient_js_1.createDefaultHttpClient; + } }); + var getClient_js_1 = require_getClient(); + Object.defineProperty(exports2, "getClient", { enumerable: true, get: function() { + return getClient_js_1.getClient; + } }); + var operationOptionHelpers_js_1 = require_operationOptionHelpers(); + Object.defineProperty(exports2, "operationOptionsToRequestParameters", { enumerable: true, get: function() { + return operationOptionHelpers_js_1.operationOptionsToRequestParameters; + } }); + var restError_js_2 = require_restError2(); + Object.defineProperty(exports2, "createRestError", { enumerable: true, get: function() { + return restError_js_2.createRestError; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js +var require_pipeline2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createEmptyPipeline = createEmptyPipeline; + var ts_http_runtime_1 = require_commonjs(); + function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js +var require_internal = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/logger/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createLoggerContext = void 0; + var logger_js_1 = require_logger(); + Object.defineProperty(exports2, "createLoggerContext", { enumerable: true, get: function() { + return logger_js_1.createLoggerContext; + } }); + } +}); + +// node_modules/@azure/logger/dist/commonjs/index.js +var require_commonjs2 = __commonJS({ + "node_modules/@azure/logger/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AzureLogger = void 0; + exports2.setLogLevel = setLogLevel; + exports2.getLogLevel = getLogLevel; + exports2.createClientLogger = createClientLogger; + var logger_1 = require_internal(); + var context2 = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure" + }); + exports2.AzureLogger = context2.logger; + function setLogLevel(level) { + context2.setLogLevel(level); + } + function getLogLevel() { + return context2.getLogLevel(); + } + function createClientLogger(namespace) { + return context2.createClientLogger(namespace); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js +var require_log3 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js +var require_exponentialRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exponentialRetryPolicyName = void 0; + exports2.exponentialRetryPolicy = exponentialRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js +var require_systemErrorRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.systemErrorRetryPolicyName = void 0; + exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; + var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + function systemErrorRetryPolicy(options = {}) { + return { + name: exports2.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true + }) + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js +var require_throttlingRetryPolicy = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.throttlingRetryPolicyName = void 0; + exports2.throttlingRetryPolicy = throttlingRetryPolicy; + var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); + var retryPolicy_js_1 = require_retryPolicy(); + var constants_js_1 = require_constants8(); + exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + function throttlingRetryPolicy(options = {}) { + return { + name: exports2.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT + }).sendRequest + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js +var require_internal2 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/policies/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.retryPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.defaultRetryPolicyName = exports2.defaultRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.agentPolicyName = exports2.agentPolicy = void 0; + var agentPolicy_js_1 = require_agentPolicy(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicy; + } }); + Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { + return decompressResponsePolicy_js_1.decompressResponsePolicyName; + } }); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicy; + } }); + Object.defineProperty(exports2, "defaultRetryPolicyName", { enumerable: true, get: function() { + return defaultRetryPolicy_js_1.defaultRetryPolicyName; + } }); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicy; + } }); + Object.defineProperty(exports2, "exponentialRetryPolicyName", { enumerable: true, get: function() { + return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; + } }); + var retryPolicy_js_1 = require_retryPolicy(); + Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { + return retryPolicy_js_1.retryPolicy; + } }); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; + } }); + Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { + return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; + } }); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicy; + } }); + Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { + return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; + } }); + var formDataPolicy_js_1 = require_formDataPolicy(); + Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicy; + } }); + Object.defineProperty(exports2, "formDataPolicyName", { enumerable: true, get: function() { + return formDataPolicy_js_1.formDataPolicyName; + } }); + var logPolicy_js_1 = require_logPolicy(); + Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicy; + } }); + Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { + return logPolicy_js_1.logPolicyName; + } }); + var multipartPolicy_js_1 = require_multipartPolicy(); + Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicy; + } }); + Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { + return multipartPolicy_js_1.multipartPolicyName; + } }); + var proxyPolicy_js_1 = require_proxyPolicy(); + Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicy; + } }); + Object.defineProperty(exports2, "proxyPolicyName", { enumerable: true, get: function() { + return proxyPolicy_js_1.proxyPolicyName; + } }); + Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { + return proxyPolicy_js_1.getDefaultProxySettings; + } }); + var redirectPolicy_js_1 = require_redirectPolicy(); + Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicy; + } }); + Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { + return redirectPolicy_js_1.redirectPolicyName; + } }); + var tlsPolicy_js_1 = require_tlsPolicy(); + Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicy; + } }); + Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { + return tlsPolicy_js_1.tlsPolicyName; + } }); + var userAgentPolicy_js_1 = require_userAgentPolicy(); + Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicy; + } }); + Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { + return userAgentPolicy_js_1.userAgentPolicyName; + } }); + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js +var require_logPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/logPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logPolicyName = void 0; + exports2.logPolicy = logPolicy; + var log_js_1 = require_log3(); + var policies_1 = require_internal2(); + exports2.logPolicyName = policies_1.logPolicyName; + function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options + }); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js +var require_redirectPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/redirectPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.redirectPolicyName = void 0; + exports2.redirectPolicy = redirectPolicy; + var policies_1 = require_internal2(); + exports2.redirectPolicyName = policies_1.redirectPolicyName; + function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js +var require_userAgentPlatform2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgentPlatform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getHeaderName = getHeaderName; + exports2.setPlatformSpecificData = setPlatformSpecificData; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_os_1 = tslib_1.__importDefault(require("node:os")); + var node_process_1 = tslib_1.__importDefault(require("node:process")); + function getHeaderName() { + return "User-Agent"; + } + async function setPlatformSpecificData(map2) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map2.set("Bun", `${versions.bun} (${osInfo})`); + } else if (versions.deno) { + map2.set("Deno", `${versions.deno} (${osInfo})`); + } else if (versions.node) { + map2.set("Node", `${versions.node} (${osInfo})`); + } + } + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js +var require_constants9 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_RETRY_POLICY_COUNT = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.22.2"; + exports2.DEFAULT_RETRY_POLICY_COUNT = 3; + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js +var require_userAgent2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/userAgent.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUserAgentHeaderName = getUserAgentHeaderName; + exports2.getUserAgentValue = getUserAgentValue; + var userAgentPlatform_js_1 = require_userAgentPlatform2(); + var constants_js_1 = require_constants9(); + function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); + } + function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); + } + async function getUserAgentValue(prefix) { + const runtimeInfo = /* @__PURE__ */ new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js +var require_userAgentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/userAgentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.userAgentPolicyName = void 0; + exports2.userAgentPolicy = userAgentPolicy; + var userAgent_js_1 = require_userAgent2(); + var UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); + exports2.userAgentPolicyName = "userAgentPolicy"; + function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports2.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + } + }; + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js +var require_sha256 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/sha256.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.computeSha256Hash = computeSha256Hash; + var node_crypto_1 = require("node:crypto"); + async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); + } + async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); + } + } +}); + +// node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js +var require_internal3 = __commonJS({ + "node_modules/@typespec/ts-http-runtime/dist/commonjs/util/internal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Sanitizer = exports2.uint8ArrayToString = exports2.stringToUint8Array = exports2.isWebWorker = exports2.isReactNative = exports2.isDeno = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isBun = exports2.isBrowser = exports2.randomUUID = exports2.computeSha256Hmac = exports2.computeSha256Hash = exports2.isError = exports2.isObject = exports2.getRandomIntegerInclusive = exports2.calculateRetryDelay = void 0; + var delay_js_1 = require_delay(); + Object.defineProperty(exports2, "calculateRetryDelay", { enumerable: true, get: function() { + return delay_js_1.calculateRetryDelay; + } }); + var random_js_1 = require_random(); + Object.defineProperty(exports2, "getRandomIntegerInclusive", { enumerable: true, get: function() { + return random_js_1.getRandomIntegerInclusive; + } }); + var object_js_1 = require_object(); + Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { + return object_js_1.isObject; + } }); + var error_js_1 = require_error(); + Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { + return error_js_1.isError; + } }); + var sha256_js_1 = require_sha256(); + Object.defineProperty(exports2, "computeSha256Hash", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hash; + } }); + Object.defineProperty(exports2, "computeSha256Hmac", { enumerable: true, get: function() { + return sha256_js_1.computeSha256Hmac; + } }); + var uuidUtils_js_1 = require_uuidUtils(); + Object.defineProperty(exports2, "randomUUID", { enumerable: true, get: function() { + return uuidUtils_js_1.randomUUID; + } }); + var checkEnvironment_js_1 = require_checkEnvironment(); + Object.defineProperty(exports2, "isBrowser", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBrowser; + } }); + Object.defineProperty(exports2, "isBun", { enumerable: true, get: function() { + return checkEnvironment_js_1.isBun; + } }); + Object.defineProperty(exports2, "isNodeLike", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeLike; + } }); + Object.defineProperty(exports2, "isNodeRuntime", { enumerable: true, get: function() { + return checkEnvironment_js_1.isNodeRuntime; + } }); + Object.defineProperty(exports2, "isDeno", { enumerable: true, get: function() { + return checkEnvironment_js_1.isDeno; + } }); + Object.defineProperty(exports2, "isReactNative", { enumerable: true, get: function() { + return checkEnvironment_js_1.isReactNative; + } }); + Object.defineProperty(exports2, "isWebWorker", { enumerable: true, get: function() { + return checkEnvironment_js_1.isWebWorker; + } }); + var bytesEncoding_js_1 = require_bytesEncoding(); + Object.defineProperty(exports2, "stringToUint8Array", { enumerable: true, get: function() { + return bytesEncoding_js_1.stringToUint8Array; + } }); + Object.defineProperty(exports2, "uint8ArrayToString", { enumerable: true, get: function() { + return bytesEncoding_js_1.uint8ArrayToString; + } }); + var sanitizer_js_1 = require_sanitizer(); + Object.defineProperty(exports2, "Sanitizer", { enumerable: true, get: function() { + return sanitizer_js_1.Sanitizer; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/aborterUtils.js +var require_aborterUtils = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/aborterUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cancelablePromiseRace = cancelablePromiseRace; + async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); + } + } + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError2 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs3 = __commonJS({ + "node_modules/@azure/core-util/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError2(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js +var require_createAbortablePromise = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createAbortablePromise = createAbortablePromise; + var abort_controller_1 = require_commonjs3(); + function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve6, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve6(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/delay.js +var require_delay2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/delay.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.delay = delay2; + exports2.calculateRetryDelay = calculateRetryDelay; + var createAbortablePromise_js_1 = require_createAbortablePromise(); + var util_1 = require_internal3(); + var StandardAbortMessage = "The delay was aborted."; + function delay2(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { + token = setTimeout(resolve6, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage + }); + } + function calculateRetryDelay(retryAttempt, config) { + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/error.js +var require_error2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorMessage = getErrorMessage2; + var util_1 = require_internal3(); + function getErrorMessage2(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } else { + stringified = String(e); + } + } catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/typeGuards.js +var require_typeGuards2 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isDefined = isDefined2; + exports2.isObjectWithProperties = isObjectWithProperties; + exports2.objectHasProperty = objectHasProperty; + function isDefined2(thing) { + return typeof thing !== "undefined" && thing !== null; + } + function isObjectWithProperties(thing, properties) { + if (!isDefined2(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; + } + function objectHasProperty(thing, property) { + return isDefined2(thing) && typeof thing === "object" && property in thing; + } + } +}); + +// node_modules/@azure/core-util/dist/commonjs/index.js +var require_commonjs4 = __commonJS({ + "node_modules/@azure/core-util/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isWebWorker = exports2.isReactNative = exports2.isNodeRuntime = exports2.isNodeLike = exports2.isNode = exports2.isDeno = exports2.isBun = exports2.isBrowser = exports2.objectHasProperty = exports2.isObjectWithProperties = exports2.isDefined = exports2.getErrorMessage = exports2.delay = exports2.createAbortablePromise = exports2.cancelablePromiseRace = void 0; + exports2.calculateRetryDelay = calculateRetryDelay; + exports2.computeSha256Hash = computeSha256Hash; + exports2.computeSha256Hmac = computeSha256Hmac; + exports2.getRandomIntegerInclusive = getRandomIntegerInclusive; + exports2.isError = isError; + exports2.isObject = isObject2; + exports2.randomUUID = randomUUID2; + exports2.uint8ArrayToString = uint8ArrayToString; + exports2.stringToUint8Array = stringToUint8Array; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var tspRuntime = tslib_1.__importStar(require_internal3()); + var aborterUtils_js_1 = require_aborterUtils(); + Object.defineProperty(exports2, "cancelablePromiseRace", { enumerable: true, get: function() { + return aborterUtils_js_1.cancelablePromiseRace; + } }); + var createAbortablePromise_js_1 = require_createAbortablePromise(); + Object.defineProperty(exports2, "createAbortablePromise", { enumerable: true, get: function() { + return createAbortablePromise_js_1.createAbortablePromise; + } }); + var delay_js_1 = require_delay2(); + Object.defineProperty(exports2, "delay", { enumerable: true, get: function() { + return delay_js_1.delay; + } }); + var error_js_1 = require_error2(); + Object.defineProperty(exports2, "getErrorMessage", { enumerable: true, get: function() { + return error_js_1.getErrorMessage; + } }); + var typeGuards_js_1 = require_typeGuards2(); + Object.defineProperty(exports2, "isDefined", { enumerable: true, get: function() { + return typeGuards_js_1.isDefined; + } }); + Object.defineProperty(exports2, "isObjectWithProperties", { enumerable: true, get: function() { + return typeGuards_js_1.isObjectWithProperties; + } }); + Object.defineProperty(exports2, "objectHasProperty", { enumerable: true, get: function() { + return typeGuards_js_1.objectHasProperty; + } }); + function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); + } + function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); + } + function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); + } + function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); + } + function isError(e) { + return tspRuntime.isError(e); + } + function isObject2(input) { + return tspRuntime.isObject(input); + } + function randomUUID2() { + return tspRuntime.randomUUID(); + } + exports2.isBrowser = tspRuntime.isBrowser; + exports2.isBun = tspRuntime.isBun; + exports2.isDeno = tspRuntime.isDeno; + exports2.isNode = tspRuntime.isNodeLike; + exports2.isNodeLike = tspRuntime.isNodeLike; + exports2.isNodeRuntime = tspRuntime.isNodeRuntime; + exports2.isReactNative = tspRuntime.isReactNative; + exports2.isWebWorker = tspRuntime.isWebWorker; + function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); + } + function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js +var require_file2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/file.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hasRawContent = hasRawContent; + exports2.getRawContent = getRawContent; + exports2.createFileFromStream = createFileFromStream; + exports2.createFile = createFile; + var core_util_1 = require_commonjs4(); + function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); + } + var unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + } + }; + var rawContent = /* @__PURE__ */ Symbol("rawContent"); + function hasRawContent(x) { + return typeof x[rawContent] === "function"; + } + function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } else { + return blob; + } + } + function createFileFromStream(stream2, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream2(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream2 + }; + } + function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? (/* @__PURE__ */ new Date()).getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content + }; + } else { + return new File([toArrayBuffer(content)], name, options); + } + } + function toArrayBuffer(source) { + if ("resize" in source.buffer) { + return source; + } + return source.map((x) => x); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js +var require_multipartPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.multipartPolicyName = void 0; + exports2.multipartPolicy = multipartPolicy; + var policies_1 = require_internal2(); + var file_js_1 = require_file2(); + exports2.multipartPolicyName = policies_1.multipartPolicyName; + function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports2.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js +var require_decompressResponsePolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/decompressResponsePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.decompressResponsePolicyName = void 0; + exports2.decompressResponsePolicy = decompressResponsePolicy; + var policies_1 = require_internal2(); + exports2.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; + function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js +var require_defaultRetryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/defaultRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultRetryPolicyName = void 0; + exports2.defaultRetryPolicy = defaultRetryPolicy; + var policies_1 = require_internal2(); + exports2.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; + function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js +var require_formDataPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/formDataPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formDataPolicyName = void 0; + exports2.formDataPolicy = formDataPolicy; + var policies_1 = require_internal2(); + exports2.formDataPolicyName = policies_1.formDataPolicyName; + function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js +var require_proxyPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/proxyPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.proxyPolicyName = void 0; + exports2.getDefaultProxySettings = getDefaultProxySettings; + exports2.proxyPolicy = proxyPolicy; + var policies_1 = require_internal2(); + exports2.proxyPolicyName = policies_1.proxyPolicyName; + function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); + } + function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js var require_setClientRequestIdPolicy = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/setClientRequestIdPolicy.js"(exports2) { @@ -37463,24 +41026,32 @@ var require_setClientRequestIdPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js +var require_agentPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/agentPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentPolicyName = void 0; + exports2.agentPolicy = agentPolicy; + var policies_1 = require_internal2(); + exports2.agentPolicyName = policies_1.agentPolicyName; + function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js -var require_tlsPolicy = __commonJS({ +var require_tlsPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/tlsPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tlsPolicyName = void 0; exports2.tlsPolicy = tlsPolicy; - exports2.tlsPolicyName = "tlsPolicy"; + var policies_1 = require_internal2(); + exports2.tlsPolicyName = policies_1.tlsPolicyName; function tlsPolicy(tlsSettings) { - return { - name: exports2.tlsPolicyName, - sendRequest: async (req, next) => { - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - } - }; + return (0, policies_1.tlsPolicy)(tlsSettings); } } }); @@ -37490,7 +41061,8 @@ var require_tracingContext = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.TracingContextImpl = exports2.createTracingContext = exports2.knownContextKeys = void 0; + exports2.TracingContextImpl = exports2.knownContextKeys = void 0; + exports2.createTracingContext = createTracingContext; exports2.knownContextKeys = { span: /* @__PURE__ */ Symbol.for("@azure/core-tracing span"), namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace") @@ -37505,8 +41077,8 @@ var require_tracingContext = __commonJS({ } return context2; } - exports2.createTracingContext = createTracingContext; var TracingContextImpl = class _TracingContextImpl { + _contextMap; constructor(initialContext) { this._contextMap = initialContext instanceof _TracingContextImpl ? new Map(initialContext._contextMap) : /* @__PURE__ */ new Map(); } @@ -37545,7 +41117,10 @@ var require_instrumenter = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/instrumenter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getInstrumenter = exports2.useInstrumenter = exports2.createDefaultInstrumenter = exports2.createDefaultTracingSpan = void 0; + exports2.createDefaultTracingSpan = createDefaultTracingSpan; + exports2.createDefaultInstrumenter = createDefaultInstrumenter; + exports2.useInstrumenter = useInstrumenter; + exports2.getInstrumenter = getInstrumenter; var tracingContext_js_1 = require_tracingContext(); var state_js_1 = require_state(); function createDefaultTracingSpan() { @@ -37558,10 +41133,11 @@ var require_instrumenter = __commonJS({ setAttribute: () => { }, setStatus: () => { + }, + addEvent: () => { } }; } - exports2.createDefaultTracingSpan = createDefaultTracingSpan; function createDefaultInstrumenter() { return { createRequestHeaders: () => { @@ -37581,18 +41157,15 @@ var require_instrumenter = __commonJS({ } }; } - exports2.createDefaultInstrumenter = createDefaultInstrumenter; function useInstrumenter(instrumenter) { state_js_1.state.instrumenterImplementation = instrumenter; } - exports2.useInstrumenter = useInstrumenter; function getInstrumenter() { if (!state_js_1.state.instrumenterImplementation) { state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); } return state_js_1.state.instrumenterImplementation; } - exports2.getInstrumenter = getInstrumenter; } }); @@ -37601,14 +41174,18 @@ var require_tracingClient = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/tracingClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTracingClient = void 0; + exports2.createTracingClient = createTracingClient; var instrumenter_js_1 = require_instrumenter(); var tracingContext_js_1 = require_tracingContext(); function createTracingClient(options) { const { namespace, packageName, packageVersion } = options; function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName, packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName, + packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext + }); let tracingContext = startSpanResult.tracingContext; const span = startSpanResult.span; if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { @@ -37616,7 +41193,7 @@ var require_tracingClient = __commonJS({ } span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }) + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext } }); return { span, @@ -37653,12 +41230,11 @@ var require_tracingClient = __commonJS({ createRequestHeaders }; } - exports2.createTracingClient = createTracingClient; } }); // node_modules/@azure/core-tracing/dist/commonjs/index.js -var require_commonjs4 = __commonJS({ +var require_commonjs5 = __commonJS({ "node_modules/@azure/core-tracing/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -37674,54 +41250,17 @@ var require_commonjs4 = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js -var require_inspect = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/inspect.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.custom = void 0; - var node_util_1 = require("node:util"); - exports2.custom = node_util_1.inspect.custom; - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js -var require_restError = __commonJS({ +var require_restError3 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/restError.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RestError = void 0; exports2.isRestError = isRestError; - var core_util_1 = require_commonjs2(); - var inspect_js_1 = require_inspect(); - var sanitizer_js_1 = require_sanitizer(); - var errorSanitizer = new sanitizer_js_1.Sanitizer(); - var RestError = class _RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, _RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - return `RestError: ${this.message} - ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } - }; - exports2.RestError = RestError; - RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; - RestError.PARSE_ERROR = "PARSE_ERROR"; + var ts_http_runtime_1 = require_commonjs(); + exports2.RestError = ts_http_runtime_1.RestError; function isRestError(e) { - if (e instanceof RestError) { - return true; - } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return (0, ts_http_runtime_1.isRestError)(e); } } }); @@ -37733,24 +41272,23 @@ var require_tracingPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; - var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants8(); - var userAgent_js_1 = require_userAgent(); - var log_js_1 = require_log(); - var core_util_1 = require_commonjs2(); - var restError_js_1 = require_restError(); - var sanitizer_js_1 = require_sanitizer(); + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants9(); + var userAgent_js_1 = require_userAgent2(); + var log_js_1 = require_log3(); + var core_util_1 = require_commonjs4(); + var restError_js_1 = require_restError3(); + var util_1 = require_internal3(); exports2.tracingPolicyName = "tracingPolicy"; function tracingPolicy(options = {}) { const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ + const sanitizer = new util_1.Sanitizer({ additionalAllowedQueryParameters: options.additionalAllowedQueryParameters }); const tracingClient = tryCreateTracingClient(); return { name: exports2.tracingPolicyName, async sendRequest(request, next) { - var _a; if (!tracingClient) { return next(request); } @@ -37764,7 +41302,7 @@ var require_tracingPolicy = __commonJS({ if (userAgent) { spanAttributes["http.user_agent"] = userAgent; } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; if (!span || !tracingContext) { return next(request); } @@ -37832,9 +41370,11 @@ var require_tracingPolicy = __commonJS({ if (serviceRequestId) { span.setAttribute("serviceRequestId", serviceRequestId); } - span.setStatus({ - status: "success" - }); + if (response.status >= 400) { + span.setStatus({ + status: "error" + }); + } span.end(); } catch (e) { log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); @@ -37843,41 +41383,106 @@ var require_tracingPolicy = __commonJS({ } }); +// node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js +var require_wrapAbortSignal = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/util/wrapAbortSignal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLike = wrapAbortSignalLike; + function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js +var require_wrapAbortSignalLikePolicy = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/wrapAbortSignalLikePolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.wrapAbortSignalLikePolicyName = void 0; + exports2.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); + exports2.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; + function wrapAbortSignalLikePolicy() { + return { + name: exports2.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + // node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js -var require_createPipelineFromOptions = __commonJS({ +var require_createPipelineFromOptions2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/createPipelineFromOptions.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineFromOptions = createPipelineFromOptions; - var logPolicy_js_1 = require_logPolicy(); - var pipeline_js_1 = require_pipeline(); - var redirectPolicy_js_1 = require_redirectPolicy(); - var userAgentPolicy_js_1 = require_userAgentPolicy(); - var multipartPolicy_js_1 = require_multipartPolicy(); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); - var formDataPolicy_js_1 = require_formDataPolicy(); - var core_util_1 = require_commonjs2(); - var proxyPolicy_js_1 = require_proxyPolicy(); + var logPolicy_js_1 = require_logPolicy2(); + var pipeline_js_1 = require_pipeline2(); + var redirectPolicy_js_1 = require_redirectPolicy2(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); + var multipartPolicy_js_1 = require_multipartPolicy2(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); + var formDataPolicy_js_1 = require_formDataPolicy2(); + var core_util_1 = require_commonjs4(); + var proxyPolicy_js_1 = require_proxyPolicy2(); var setClientRequestIdPolicy_js_1 = require_setClientRequestIdPolicy(); - var tlsPolicy_js_1 = require_tlsPolicy(); + var agentPolicy_js_1 = require_agentPolicy2(); + var tlsPolicy_js_1 = require_tlsPolicy2(); var tracingPolicy_js_1 = require_tracingPolicy(); + var wrapAbortSignalLikePolicy_js_1 = require_wrapAbortSignalLikePolicy(); function createPipelineFromOptions(options) { - var _a; const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } if (options.tlsOptions) { pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); } pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { afterPhase: "Retry" }); if (core_util_1.isNodeLike) { @@ -37889,425 +41494,117 @@ var require_createPipelineFromOptions = __commonJS({ } }); -// node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js -var require_nodeHttpClient = __commonJS({ - "node_modules/@azure/core-rest-pipeline/dist/commonjs/nodeHttpClient.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getBodyLength = getBodyLength; - exports2.createNodeHttpClient = createNodeHttpClient; - var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); - var http = tslib_1.__importStar(require("node:http")); - var https2 = tslib_1.__importStar(require("node:https")); - var zlib2 = tslib_1.__importStar(require("node:zlib")); - var node_stream_1 = require("node:stream"); - var abort_controller_1 = require_commonjs3(); - var httpHeaders_js_1 = require_httpHeaders(); - var restError_js_1 = require_restError(); - var log_js_1 = require_log(); - var DEFAULT_TLS_SETTINGS = {}; - function isReadableStream(body) { - return body && typeof body.pipe === "function"; - } - function isStreamComplete(stream2) { - return new Promise((resolve6) => { - const handler = () => { - resolve6(); - stream2.removeListener("close", handler); - stream2.removeListener("end", handler); - stream2.removeListener("error", handler); - }; - stream2.on("close", handler); - stream2.on("end", handler); - stream2.on("error", handler); - }); - } - function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; - } - var ReportTransform = class extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } - }; - var NodeHttpClient = class { - constructor() { - this.cachedHttpsAgents = /* @__PURE__ */ new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - if (request.timeout > 0) { - setTimeout(() => { - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request - }; - if (request.method === "HEAD") { - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status)) - ) { - response.readableStreamBody = responseStream; - } else { - response.bodyAsText = await streamToText(responseStream); - } - return response; - } finally { - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]).then(() => { - var _a2; - if (abortListener) { - (_a2 = request.abortSignal) === null || _a2 === void 0 ? void 0 : _a2.removeEventListener("abort", abortListener); - } - }).catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } - } - } - makeRequest(request, abortController, body) { - var _a; - 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: url2.hostname, - path: `${url2.pathname}${url2.search}`, - port: url2.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }) - }; - return new Promise((resolve6, reject) => { - const req = isInsecure ? http.request(options, resolve6) : https2.request(options, resolve6); - req.once("error", (err) => { - var _a2; - reject(new restError_js_1.RestError(err.message, { code: (_a2 = err.code) !== null && _a2 !== void 0 ? _a2 : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } else { - req.end(); - } - }); - } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - if (isInsecure) { - if (disableKeepAlive) { - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } else { - if (disableKeepAlive && !request.tlsSettings) { - return https2.globalAgent; - } - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https2.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive - }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } - } - }; - function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } - } else if (value) { - headers.set(header, value); - } - } - return headers; - } - function getDecodedResponseStream(stream2, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib2.createGunzip(); - stream2.pipe(unzip); - return unzip; - } else if (contentEncoding === "deflate") { - const inflate = zlib2.createInflate(); - stream2.pipe(inflate); - return inflate; - } - return stream2; - } - function streamToText(stream2) { - return new Promise((resolve6, reject) => { - const buffer = []; - stream2.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } else { - buffer.push(Buffer.from(chunk)); - } - }); - stream2.on("end", () => { - resolve6(Buffer.concat(buffer).toString("utf8")); - }); - stream2.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); - } else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR - })); - } - }); - }); - } - function getBodyLength(body) { - if (!body) { - return 0; - } else if (Buffer.isBuffer(body)) { - return body.length; - } else if (isReadableStream(body)) { - return null; - } else if (isArrayBuffer(body)) { - return body.byteLength; - } else if (typeof body === "string") { - return Buffer.from(body).length; - } else { - return null; - } - } - function createNodeHttpClient() { - return new NodeHttpClient(); - } - } -}); - // node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js -var require_defaultHttpClient = __commonJS({ +var require_defaultHttpClient2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/defaultHttpClient.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDefaultHttpClient = createDefaultHttpClient; - var nodeHttpClient_js_1 = require_nodeHttpClient(); + var ts_http_runtime_1 = require_commonjs(); + var wrapAbortSignal_js_1 = require_wrapAbortSignal(); function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + const { abortSignal, cleanup } = request.abortSignal ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } finally { + cleanup?.(); + } + } + }; + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js +var require_httpHeaders2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/httpHeaders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpHeaders = createHttpHeaders; + var ts_http_runtime_1 = require_commonjs(); + function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js -var require_pipelineRequest = __commonJS({ +var require_pipelineRequest2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/pipelineRequest.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createPipelineRequest = createPipelineRequest; - var httpHeaders_js_1 = require_httpHeaders(); - var core_util_1 = require_commonjs2(); - var PipelineRequestImpl = class { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - } - }; + var ts_http_runtime_1 = require_commonjs(); function createPipelineRequest(options) { - return new PipelineRequestImpl(options); + return (0, ts_http_runtime_1.createPipelineRequest)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js -var require_exponentialRetryPolicy = __commonJS({ +var require_exponentialRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/exponentialRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.exponentialRetryPolicyName = void 0; exports2.exponentialRetryPolicy = exponentialRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; + var policies_1 = require_internal2(); + exports2.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }); + return (0, policies_1.exponentialRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js -var require_systemErrorRetryPolicy = __commonJS({ +var require_systemErrorRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/systemErrorRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.systemErrorRetryPolicyName = void 0; exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; - var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; + var policies_1 = require_internal2(); + exports2.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; function systemErrorRetryPolicy(options = {}) { - var _a; - return { - name: exports2.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })) - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.systemErrorRetryPolicy)(options); } } }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js -var require_throttlingRetryPolicy = __commonJS({ +var require_throttlingRetryPolicy2 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/throttlingRetryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.throttlingRetryPolicyName = void 0; exports2.throttlingRetryPolicy = throttlingRetryPolicy; - var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); - var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants8(); - exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; + var policies_1 = require_internal2(); + exports2.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports2.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT - }).sendRequest - }; + return (0, policies_1.throttlingRetryPolicy)(options); + } + } +}); + +// node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js +var require_retryPolicy2 = __commonJS({ + "node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/retryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.retryPolicy = retryPolicy; + var logger_1 = require_commonjs2(); + var constants_js_1 = require_constants9(); + var policies_1 = require_internal2(); + var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); + function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options + }); } } }); @@ -38319,7 +41616,7 @@ var require_tokenCycler = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_CYCLER_OPTIONS = void 0; exports2.createTokenCycler = createTokenCycler; - var helpers_js_1 = require_helpers(); + var core_util_1 = require_commonjs4(); exports2.DEFAULT_CYCLER_OPTIONS = { forcedRefreshWindowInMs: 1e3, // Force waiting for a refresh 1s before the token expires @@ -38333,7 +41630,7 @@ var require_tokenCycler = __commonJS({ if (Date.now() < refreshTimeout) { try { return await getAccessToken(); - } catch (_a) { + } catch { return null; } } else { @@ -38346,7 +41643,7 @@ var require_tokenCycler = __commonJS({ } let token = await tryGetAccessToken(); while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); + await (0, core_util_1.delay)(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -38355,7 +41652,10 @@ var require_tokenCycler = __commonJS({ let refreshWorker = null; let token = null; let tenantId; - const options = Object.assign(Object.assign({}, exports2.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); + const options = { + ...exports2.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions + }; const cycler = { /** * Produces true if a refresh job is currently in progress. @@ -38368,14 +41668,13 @@ var require_tokenCycler = __commonJS({ * window and not already refreshing) */ get shouldRefresh() { - var _a; if (cycler.isRefreshing) { return false; } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { return true; } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); }, /** * Produces true if the cycler MUST refresh (null or nearly-expired @@ -38386,14 +41685,13 @@ var require_tokenCycler = __commonJS({ } }; function refresh(scopes, getTokenOptions) { - var _a; if (!cycler.isRefreshing) { const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); refreshWorker = beginRefresh( tryGetAccessToken, options.retryIntervalInMs, // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now() + token?.expiresOnTimestamp ?? Date.now() ).then((_token) => { refreshWorker = null; token = _token; @@ -38434,32 +41732,56 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.bearerTokenAuthenticationPolicyName = void 0; exports2.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; + exports2.parseChallenges = parseChallenges; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); + var restError_js_1 = require_restError3(); exports2.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; + async function trySendRequest(request, next) { + try { + return [await next(request), void 0]; + } catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } else { + throw e; + } + } + } async function defaultAuthorizeRequest(options) { const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions + tracingOptions: request.tracingOptions, + enableCae: true }; const accessToken = await getAccessToken(scopes, getTokenOptions); if (accessToken) { options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } } - function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; + function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); + } + async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims + }); + if (!accessToken) { + return false; } - return; + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } function bearerTokenAuthenticationPolicy(options) { - var _a; const { credential, scopes, challengeCallbacks } = options; const logger = options.logger || log_js_1.logger; - const callbacks = Object.assign({ authorizeRequest: (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) !== null && _a !== void 0 ? _a : defaultAuthorizeRequest, authorizeRequestOnChallenge: challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge }, challengeCallbacks); + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks) + }; const getAccessToken = credential ? (0, tokenCycler_js_1.createTokenCycler)( credential /* , options */ @@ -38491,22 +41813,61 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ }); let response; let error3; - try { - response = await next(request); - } catch (err) { - error3 = err; - response = err.response; - } - if (callbacks.authorizeRequestOnChallenge && (response === null || response === void 0 ? void 0 : response.status) === 401 && getChallenge(response)) { - const shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger - }); - if (shouldSendRequest) { - return next(request); + let shouldSendRequest; + [response, error3] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } else if (callbacks.authorizeRequestOnChallenge) { + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger + }); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger + }, parsedClaim); + if (shouldSendRequest) { + [response, error3] = await trySendRequest(request, next); + } + } + } } } if (error3) { @@ -38517,6 +41878,30 @@ var require_bearerTokenAuthenticationPolicy = __commonJS({ } }; } + function parseChallenges(challenges) { + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; + } + function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; + } } }); @@ -38553,17 +41938,16 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ exports2.auxiliaryAuthenticationHeaderPolicyName = void 0; exports2.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; var tokenCycler_js_1 = require_tokenCycler(); - var log_js_1 = require_log(); + var log_js_1 = require_log3(); exports2.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; var AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; async function sendAuthorizeRequest(options) { - var _a, _b; const { scopes, getAccessToken, request } = options; const getTokenOptions = { abortSignal: request.abortSignal, tracingOptions: request.tracingOptions }; - return (_b = (_a = await getAccessToken(scopes, getTokenOptions)) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; } function auxiliaryAuthenticationHeaderPolicy(options) { const { credentials, scopes } = options; @@ -38607,46 +41991,46 @@ var require_auxiliaryAuthenticationHeaderPolicy = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js -var require_commonjs5 = __commonJS({ +var require_commonjs6 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileFromStream = exports2.createFile = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; - var pipeline_js_1 = require_pipeline(); + exports2.createFileFromStream = exports2.createFile = exports2.agentPolicyName = exports2.agentPolicy = exports2.auxiliaryAuthenticationHeaderPolicyName = exports2.auxiliaryAuthenticationHeaderPolicy = exports2.ndJsonPolicyName = exports2.ndJsonPolicy = exports2.bearerTokenAuthenticationPolicyName = exports2.bearerTokenAuthenticationPolicy = exports2.formDataPolicyName = exports2.formDataPolicy = exports2.tlsPolicyName = exports2.tlsPolicy = exports2.userAgentPolicyName = exports2.userAgentPolicy = exports2.defaultRetryPolicy = exports2.tracingPolicyName = exports2.tracingPolicy = exports2.retryPolicy = exports2.throttlingRetryPolicyName = exports2.throttlingRetryPolicy = exports2.systemErrorRetryPolicyName = exports2.systemErrorRetryPolicy = exports2.redirectPolicyName = exports2.redirectPolicy = exports2.getDefaultProxySettings = exports2.proxyPolicyName = exports2.proxyPolicy = exports2.multipartPolicyName = exports2.multipartPolicy = exports2.logPolicyName = exports2.logPolicy = exports2.setClientRequestIdPolicyName = exports2.setClientRequestIdPolicy = exports2.exponentialRetryPolicyName = exports2.exponentialRetryPolicy = exports2.decompressResponsePolicyName = exports2.decompressResponsePolicy = exports2.isRestError = exports2.RestError = exports2.createPipelineRequest = exports2.createHttpHeaders = exports2.createDefaultHttpClient = exports2.createPipelineFromOptions = exports2.createEmptyPipeline = void 0; + var pipeline_js_1 = require_pipeline2(); Object.defineProperty(exports2, "createEmptyPipeline", { enumerable: true, get: function() { return pipeline_js_1.createEmptyPipeline; } }); - var createPipelineFromOptions_js_1 = require_createPipelineFromOptions(); + var createPipelineFromOptions_js_1 = require_createPipelineFromOptions2(); Object.defineProperty(exports2, "createPipelineFromOptions", { enumerable: true, get: function() { return createPipelineFromOptions_js_1.createPipelineFromOptions; } }); - var defaultHttpClient_js_1 = require_defaultHttpClient(); + var defaultHttpClient_js_1 = require_defaultHttpClient2(); Object.defineProperty(exports2, "createDefaultHttpClient", { enumerable: true, get: function() { return defaultHttpClient_js_1.createDefaultHttpClient; } }); - var httpHeaders_js_1 = require_httpHeaders(); + var httpHeaders_js_1 = require_httpHeaders2(); Object.defineProperty(exports2, "createHttpHeaders", { enumerable: true, get: function() { return httpHeaders_js_1.createHttpHeaders; } }); - var pipelineRequest_js_1 = require_pipelineRequest(); + var pipelineRequest_js_1 = require_pipelineRequest2(); Object.defineProperty(exports2, "createPipelineRequest", { enumerable: true, get: function() { return pipelineRequest_js_1.createPipelineRequest; } }); - var restError_js_1 = require_restError(); + var restError_js_1 = require_restError3(); Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { return restError_js_1.RestError; } }); Object.defineProperty(exports2, "isRestError", { enumerable: true, get: function() { return restError_js_1.isRestError; } }); - var decompressResponsePolicy_js_1 = require_decompressResponsePolicy(); + var decompressResponsePolicy_js_1 = require_decompressResponsePolicy2(); Object.defineProperty(exports2, "decompressResponsePolicy", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicy; } }); Object.defineProperty(exports2, "decompressResponsePolicyName", { enumerable: true, get: function() { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } }); - var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy(); + var exponentialRetryPolicy_js_1 = require_exponentialRetryPolicy2(); Object.defineProperty(exports2, "exponentialRetryPolicy", { enumerable: true, get: function() { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } }); @@ -38660,21 +42044,21 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "setClientRequestIdPolicyName", { enumerable: true, get: function() { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } }); - var logPolicy_js_1 = require_logPolicy(); + var logPolicy_js_1 = require_logPolicy2(); Object.defineProperty(exports2, "logPolicy", { enumerable: true, get: function() { return logPolicy_js_1.logPolicy; } }); Object.defineProperty(exports2, "logPolicyName", { enumerable: true, get: function() { return logPolicy_js_1.logPolicyName; } }); - var multipartPolicy_js_1 = require_multipartPolicy(); + var multipartPolicy_js_1 = require_multipartPolicy2(); Object.defineProperty(exports2, "multipartPolicy", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicy; } }); Object.defineProperty(exports2, "multipartPolicyName", { enumerable: true, get: function() { return multipartPolicy_js_1.multipartPolicyName; } }); - var proxyPolicy_js_1 = require_proxyPolicy(); + var proxyPolicy_js_1 = require_proxyPolicy2(); Object.defineProperty(exports2, "proxyPolicy", { enumerable: true, get: function() { return proxyPolicy_js_1.proxyPolicy; } }); @@ -38684,28 +42068,28 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "getDefaultProxySettings", { enumerable: true, get: function() { return proxyPolicy_js_1.getDefaultProxySettings; } }); - var redirectPolicy_js_1 = require_redirectPolicy(); + var redirectPolicy_js_1 = require_redirectPolicy2(); Object.defineProperty(exports2, "redirectPolicy", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicy; } }); Object.defineProperty(exports2, "redirectPolicyName", { enumerable: true, get: function() { return redirectPolicy_js_1.redirectPolicyName; } }); - var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy(); + var systemErrorRetryPolicy_js_1 = require_systemErrorRetryPolicy2(); Object.defineProperty(exports2, "systemErrorRetryPolicy", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } }); Object.defineProperty(exports2, "systemErrorRetryPolicyName", { enumerable: true, get: function() { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } }); - var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy(); + var throttlingRetryPolicy_js_1 = require_throttlingRetryPolicy2(); Object.defineProperty(exports2, "throttlingRetryPolicy", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } }); Object.defineProperty(exports2, "throttlingRetryPolicyName", { enumerable: true, get: function() { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } }); - var retryPolicy_js_1 = require_retryPolicy(); + var retryPolicy_js_1 = require_retryPolicy2(); Object.defineProperty(exports2, "retryPolicy", { enumerable: true, get: function() { return retryPolicy_js_1.retryPolicy; } }); @@ -38716,25 +42100,25 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "tracingPolicyName", { enumerable: true, get: function() { return tracingPolicy_js_1.tracingPolicyName; } }); - var defaultRetryPolicy_js_1 = require_defaultRetryPolicy(); + var defaultRetryPolicy_js_1 = require_defaultRetryPolicy2(); Object.defineProperty(exports2, "defaultRetryPolicy", { enumerable: true, get: function() { return defaultRetryPolicy_js_1.defaultRetryPolicy; } }); - var userAgentPolicy_js_1 = require_userAgentPolicy(); + var userAgentPolicy_js_1 = require_userAgentPolicy2(); Object.defineProperty(exports2, "userAgentPolicy", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicy; } }); Object.defineProperty(exports2, "userAgentPolicyName", { enumerable: true, get: function() { return userAgentPolicy_js_1.userAgentPolicyName; } }); - var tlsPolicy_js_1 = require_tlsPolicy(); + var tlsPolicy_js_1 = require_tlsPolicy2(); Object.defineProperty(exports2, "tlsPolicy", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicy; } }); Object.defineProperty(exports2, "tlsPolicyName", { enumerable: true, get: function() { return tlsPolicy_js_1.tlsPolicyName; } }); - var formDataPolicy_js_1 = require_formDataPolicy(); + var formDataPolicy_js_1 = require_formDataPolicy2(); Object.defineProperty(exports2, "formDataPolicy", { enumerable: true, get: function() { return formDataPolicy_js_1.formDataPolicy; } }); @@ -38762,6 +42146,13 @@ var require_commonjs5 = __commonJS({ Object.defineProperty(exports2, "auxiliaryAuthenticationHeaderPolicyName", { enumerable: true, get: function() { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } }); + var agentPolicy_js_1 = require_agentPolicy2(); + Object.defineProperty(exports2, "agentPolicy", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicy; + } }); + Object.defineProperty(exports2, "agentPolicyName", { enumerable: true, get: function() { + return agentPolicy_js_1.agentPolicyName; + } }); var file_js_1 = require_file2(); Object.defineProperty(exports2, "createFile", { enumerable: true, get: function() { return file_js_1.createFile; @@ -38772,509 +42163,6 @@ var require_commonjs5 = __commonJS({ } }); -// node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports2 = {}; -__export(tslib_es6_exports2, { - __addDisposableResource: () => __addDisposableResource2, - __assign: () => __assign2, - __asyncDelegator: () => __asyncDelegator2, - __asyncGenerator: () => __asyncGenerator2, - __asyncValues: () => __asyncValues2, - __await: () => __await2, - __awaiter: () => __awaiter2, - __classPrivateFieldGet: () => __classPrivateFieldGet2, - __classPrivateFieldIn: () => __classPrivateFieldIn2, - __classPrivateFieldSet: () => __classPrivateFieldSet2, - __createBinding: () => __createBinding2, - __decorate: () => __decorate2, - __disposeResources: () => __disposeResources2, - __esDecorate: () => __esDecorate2, - __exportStar: () => __exportStar2, - __extends: () => __extends2, - __generator: () => __generator2, - __importDefault: () => __importDefault2, - __importStar: () => __importStar2, - __makeTemplateObject: () => __makeTemplateObject2, - __metadata: () => __metadata2, - __param: () => __param2, - __propKey: () => __propKey2, - __read: () => __read2, - __rest: () => __rest2, - __runInitializers: () => __runInitializers2, - __setFunctionName: () => __setFunctionName2, - __spread: () => __spread2, - __spreadArray: () => __spreadArray2, - __spreadArrays: () => __spreadArrays2, - __values: () => __values3, - default: () => tslib_es6_default2 -}); -function __extends2(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics2(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest2(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate2(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param2(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate2(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers2(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey2(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName2(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata2(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter2(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator2(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar2(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding2(o, m, p); -} -function __values3(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read2(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread2() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read2(arguments[i])); - return ar; -} -function __spreadArrays2() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray2(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await2(v) { - return this instanceof __await2 ? (this.v = v, this) : new __await2(v); -} -function __asyncGenerator2(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator2(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await2(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues2(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values3 === "function" ? __values3(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject2(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar2(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); - } - __setModuleDefault2(result, mod); - return result; -} -function __importDefault2(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet2(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet2(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn2(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource2(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources2(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError2(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics2, __assign2, __createBinding2, __setModuleDefault2, _SuppressedError2, tslib_es6_default2; -var init_tslib_es62 = __esm({ - "node_modules/@azure/storage-blob/node_modules/tslib/tslib.es6.mjs"() { - extendStatics2 = function(d, b) { - extendStatics2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics2(d, b); - }; - __assign2 = function() { - __assign2 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); - }; - __createBinding2 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault2 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError2 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default2 = { - __extends: __extends2, - __assign: __assign2, - __rest: __rest2, - __decorate: __decorate2, - __param: __param2, - __metadata: __metadata2, - __awaiter: __awaiter2, - __generator: __generator2, - __createBinding: __createBinding2, - __exportStar: __exportStar2, - __values: __values3, - __read: __read2, - __spread: __spread2, - __spreadArrays: __spreadArrays2, - __spreadArray: __spreadArray2, - __await: __await2, - __asyncGenerator: __asyncGenerator2, - __asyncDelegator: __asyncDelegator2, - __asyncValues: __asyncValues2, - __makeTemplateObject: __makeTemplateObject2, - __importStar: __importStar2, - __importDefault: __importDefault2, - __classPrivateFieldGet: __classPrivateFieldGet2, - __classPrivateFieldSet: __classPrivateFieldSet2, - __classPrivateFieldIn: __classPrivateFieldIn2, - __addDisposableResource: __addDisposableResource2, - __disposeResources: __disposeResources2 - }; - } -}); - // node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js var require_azureKeyCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.js"(exports2) { @@ -39282,6 +42170,7 @@ var require_azureKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureKeyCredential = void 0; var AzureKeyCredential = class { + _key; /** * The value of the key to be used in authentication */ @@ -39322,7 +42211,7 @@ var require_keyCredential = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyCredential = isKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); function isKeyCredential(credential) { return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } @@ -39336,8 +42225,10 @@ var require_azureNamedKeyCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureNamedKeyCredential = void 0; exports2.isNamedKeyCredential = isNamedKeyCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureNamedKeyCredential = class { + _key; + _name; /** * The value of the key to be used in authentication. */ @@ -39395,8 +42286,9 @@ var require_azureSASCredential = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AzureSASCredential = void 0; exports2.isSASCredential = isSASCredential; - var core_util_1 = require_commonjs2(); + var core_util_1 = require_commonjs4(); var AzureSASCredential = class { + _signature; /** * The value of the shared access signature to be used in authentication */ @@ -39442,7 +42334,15 @@ var require_tokenCredential = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/tokenCredential.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isBearerToken = isBearerToken; + exports2.isPopToken = isPopToken; exports2.isTokenCredential = isTokenCredential; + function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; + } + function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; + } function isTokenCredential(credential) { const castCredential = credential; return castCredential && typeof castCredential.getToken === "function" && (castCredential.signRequest === void 0 || castCredential.getToken.length > 0); @@ -39451,7 +42351,7 @@ var require_tokenCredential = __commonJS({ }); // node_modules/@azure/core-auth/dist/commonjs/index.js -var require_commonjs6 = __commonJS({ +var require_commonjs7 = __commonJS({ "node_modules/@azure/core-auth/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -39490,7 +42390,9 @@ var require_disableKeepAlivePolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/disableKeepAlivePolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.pipelineContainsDisableKeepAlivePolicy = exports2.createDisableKeepAlivePolicy = exports2.disableKeepAlivePolicyName = void 0; + exports2.disableKeepAlivePolicyName = void 0; + exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; + exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; exports2.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; function createDisableKeepAlivePolicy() { return { @@ -39501,514 +42403,9 @@ var require_disableKeepAlivePolicy = __commonJS({ } }; } - exports2.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; function pipelineContainsDisableKeepAlivePolicy(pipeline) { return pipeline.getOrderedPolicies().some((policy) => policy.name === exports2.disableKeepAlivePolicyName); } - exports2.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; - } -}); - -// node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs -var tslib_es6_exports3 = {}; -__export(tslib_es6_exports3, { - __addDisposableResource: () => __addDisposableResource3, - __assign: () => __assign3, - __asyncDelegator: () => __asyncDelegator3, - __asyncGenerator: () => __asyncGenerator3, - __asyncValues: () => __asyncValues3, - __await: () => __await3, - __awaiter: () => __awaiter3, - __classPrivateFieldGet: () => __classPrivateFieldGet3, - __classPrivateFieldIn: () => __classPrivateFieldIn3, - __classPrivateFieldSet: () => __classPrivateFieldSet3, - __createBinding: () => __createBinding3, - __decorate: () => __decorate3, - __disposeResources: () => __disposeResources3, - __esDecorate: () => __esDecorate3, - __exportStar: () => __exportStar3, - __extends: () => __extends3, - __generator: () => __generator3, - __importDefault: () => __importDefault3, - __importStar: () => __importStar3, - __makeTemplateObject: () => __makeTemplateObject3, - __metadata: () => __metadata3, - __param: () => __param3, - __propKey: () => __propKey3, - __read: () => __read3, - __rest: () => __rest3, - __runInitializers: () => __runInitializers3, - __setFunctionName: () => __setFunctionName3, - __spread: () => __spread3, - __spreadArray: () => __spreadArray3, - __spreadArrays: () => __spreadArrays3, - __values: () => __values4, - default: () => tslib_es6_default3 -}); -function __extends3(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -function __rest3(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} -function __decorate3(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} -function __param3(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; -} -function __esDecorate3(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { - if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); - return f; - } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context2 = {}; - for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context2.access[p] = contextIn.access[p]; - context2.addInitializer = function(f) { - if (done) throw new TypeError("Cannot add initializers after decoration has completed"); - extraInitializers.push(accept(f || null)); - }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context2); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; -} -function __runInitializers3(thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; -} -function __propKey3(x) { - return typeof x === "symbol" ? x : "".concat(x); -} -function __setFunctionName3(f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -} -function __metadata3(metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); -} -function __awaiter3(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator3(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -} -function __exportStar3(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding3(o, m, p); -} -function __values4(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function() { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read3(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error3) { - e = { error: error3 }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} -function __spread3() { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read3(arguments[i])); - return ar; -} -function __spreadArrays3() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -} -function __spreadArray3(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -} -function __await3(v) { - return this instanceof __await3 ? (this.v = v, this) : new __await3(v); -} -function __asyncGenerator3(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function awaitReturn(f) { - return function(v) { - return Promise.resolve(v).then(f, reject); - }; - } - function verb(n, f) { - if (g[n]) { - i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - if (f) i[n] = f(i[n]); - } - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await3 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } -} -function __asyncDelegator3(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function(e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function() { - return this; - }, i; - function verb(n, f) { - i[n] = o[n] ? function(v) { - return (p = !p) ? { value: __await3(o[n](v)), done: false } : f ? f(v) : v; - } : f; - } -} -function __asyncValues3(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values4 === "function" ? __values4(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } -} -function __makeTemplateObject3(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { value: raw }); - } else { - cooked.raw = raw; - } - return cooked; -} -function __importStar3(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding3(result, mod, k); - } - __setModuleDefault3(result, mod); - return result; -} -function __importDefault3(mod) { - return mod && mod.__esModule ? mod : { default: mod }; -} -function __classPrivateFieldGet3(receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -} -function __classPrivateFieldSet3(receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; -} -function __classPrivateFieldIn3(state, receiver) { - if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); -} -function __addDisposableResource3(env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { - try { - inner.call(this); - } catch (e) { - return Promise.reject(e); - } - }; - env.stack.push({ value, dispose, async }); - } else if (async) { - env.stack.push({ async: true }); - } - return value; -} -function __disposeResources3(env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError3(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { - fail(e); - return next(); - }); - } else s |= 1; - } catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); -} -var extendStatics3, __assign3, __createBinding3, __setModuleDefault3, _SuppressedError3, tslib_es6_default3; -var init_tslib_es63 = __esm({ - "node_modules/@azure/core-client/node_modules/tslib/tslib.es6.mjs"() { - extendStatics3 = function(d, b) { - extendStatics3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { - d2.__proto__ = b2; - } || function(d2, b2) { - for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; - }; - return extendStatics3(d, b); - }; - __assign3 = function() { - __assign3 = Object.assign || function __assign4(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); - }; - __createBinding3 = Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - }); - __setModuleDefault3 = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - _SuppressedError3 = typeof SuppressedError === "function" ? SuppressedError : function(error3, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e; - }; - tslib_es6_default3 = { - __extends: __extends3, - __assign: __assign3, - __rest: __rest3, - __decorate: __decorate3, - __param: __param3, - __metadata: __metadata3, - __awaiter: __awaiter3, - __generator: __generator3, - __createBinding: __createBinding3, - __exportStar: __exportStar3, - __values: __values4, - __read: __read3, - __spread: __spread3, - __spreadArrays: __spreadArrays3, - __spreadArray: __spreadArray3, - __await: __await3, - __asyncGenerator: __asyncGenerator3, - __asyncDelegator: __asyncDelegator3, - __asyncValues: __asyncValues3, - __makeTemplateObject: __makeTemplateObject3, - __importStar: __importStar3, - __importDefault: __importDefault3, - __classPrivateFieldGet: __classPrivateFieldGet3, - __classPrivateFieldSet: __classPrivateFieldSet3, - __classPrivateFieldIn: __classPrivateFieldIn3, - __addDisposableResource: __addDisposableResource3, - __disposeResources: __disposeResources3 - }; } }); @@ -40017,24 +42414,23 @@ var require_base64 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/base64.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.decodeStringToString = exports2.decodeString = exports2.encodeByteArray = exports2.encodeString = void 0; + exports2.encodeString = encodeString; + exports2.encodeByteArray = encodeByteArray; + exports2.decodeString = decodeString; + exports2.decodeStringToString = decodeStringToString; function encodeString(value) { return Buffer.from(value).toString("base64"); } - exports2.encodeString = encodeString; function encodeByteArray(value) { const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); return bufferValue.toString("base64"); } - exports2.encodeByteArray = encodeByteArray; function decodeString(value) { return Buffer.from(value, "base64"); } - exports2.decodeString = decodeString; function decodeStringToString(value) { return Buffer.from(value, "base64").toString(); } - exports2.decodeStringToString = decodeStringToString; } }); @@ -40050,52 +42446,64 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils5 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.flattenResponse = exports2.isValidUuid = exports2.isDuration = exports2.isPrimitiveBody = void 0; - function isPrimitiveBody(value, mapperTypeName) { - return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== null || value === void 0 || value === null); - } exports2.isPrimitiveBody = isPrimitiveBody; + exports2.isDuration = isDuration; + exports2.isValidUuid = isValidUuid; + exports2.flattenResponse = flattenResponse; + function isPrimitiveBody(value, mapperTypeName) { + return mapperTypeName !== "Composite" && mapperTypeName !== "Dictionary" && (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== null || value === void 0 || value === null); + } var validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function isDuration(value) { return validateISODuration.test(value); } - exports2.isDuration = isDuration; var validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; function isValidUuid(uuid) { return validUuidRegex.test(uuid); } - exports2.isValidUuid = isValidUuid; function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body + }; if (responseObject.hasNullableType && Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { return responseObject.shouldWrapBody ? { body: null } : null; } else { - return responseObject.shouldWrapBody ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + return responseObject.shouldWrapBody ? { + ...responseObject.headers, + body: responseObject.body + } : combinedHeadersAndBody; } } function flattenResponse(fullResponse, responseSpec) { - var _a, _b; const parsedHeaders = fullResponse.parsedHeaders; if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); + return { + ...parsedHeaders, + body: fullResponse.parsedBody + }; } const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody + }; } const modelProperties = expectedBodyTypeName === "Composite" && bodyMapper.type.modelProperties || {}; const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; + const arrayResponse = fullResponse.parsedBody ?? []; for (const key of Object.keys(modelProperties)) { if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; + arrayResponse[key] = fullResponse.parsedBody?.[key]; } } if (parsedHeaders) { @@ -40112,7 +42520,6 @@ var require_utils5 = __commonJS({ shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName) }); } - exports2.flattenResponse = flattenResponse; } }); @@ -40121,12 +42528,15 @@ var require_serializer = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.MapperTypeNames = exports2.createSerializer = void 0; - var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); + exports2.MapperTypeNames = void 0; + exports2.createSerializer = createSerializer; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils5(); + var utils_js_1 = require_utils6(); var SerializerImpl = class { + modelMappers; + isXML; constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; this.isXML = isXML; @@ -40192,12 +42602,11 @@ var require_serializer = __commonJS({ * @returns A valid serialized Javascript object */ serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; let payload = {}; @@ -40261,14 +42670,13 @@ var require_serializer = __commonJS({ * @returns A valid deserialized Javascript object */ deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; const updatedOptions = { xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false }; if (responseBody === void 0 || responseBody === null) { if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { @@ -40331,7 +42739,6 @@ var require_serializer = __commonJS({ function createSerializer(modelMappers = {}, isXML = false) { return new SerializerImpl(modelMappers, isXML); } - exports2.createSerializer = createSerializer; function trimEnd(str2, ch) { let len = str2.length; while (len - 1 >= 0 && str2[len - 1] === ch) { @@ -40485,7 +42892,6 @@ var require_serializer = __commonJS({ return value; } function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; if (!Array.isArray(object)) { throw new Error(`${objectName} must be of type Array.`); } @@ -40494,7 +42900,7 @@ var require_serializer = __commonJS({ throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}.`); } if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } const tempArray = []; for (let i = 0; i < object.length; i++) { @@ -40502,7 +42908,7 @@ var require_serializer = __commonJS({ if (isXml && elementType.xmlNamespace) { const xmlnsKey = elementType.xmlNamespacePrefix ? `xmlns:${elementType.xmlNamespacePrefix}` : "xmlns"; if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); + tempArray[i] = { ...serializedValue }; tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; } else { tempArray[i] = {}; @@ -40540,7 +42946,7 @@ var require_serializer = __commonJS({ const additionalProperties = mapper.type.additionalProperties; if (!additionalProperties && mapper.type.className) { const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + return modelMapper?.type.additionalProperties; } return additionalProperties; } @@ -40558,7 +42964,7 @@ var require_serializer = __commonJS({ if (!modelMapper) { throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; + modelProps = modelMapper?.type.modelProperties; if (!modelProps) { throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); } @@ -40599,7 +43005,10 @@ var require_serializer = __commonJS({ if (parentObject !== void 0 && parentObject !== null) { if (isXml && mapper.xmlNamespace) { const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace + }; } const propertyObjectName = propertyMapper.serializedName !== "" ? objectName + "." + propertyMapper.serializedName : objectName; let toSerialize = object[key]; @@ -40645,7 +43054,7 @@ var require_serializer = __commonJS({ if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { return serializedValue; } else { - const result2 = Object.assign({}, serializedValue); + const result2 = { ...serializedValue }; result2[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; return result2; } @@ -40659,8 +43068,7 @@ var require_serializer = __commonJS({ return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -40699,7 +43107,7 @@ var require_serializer = __commonJS({ const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; + const elementList = wrapped?.[xmlElementName] ?? []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); handledPropertyNames.push(xmlName); } else { @@ -40782,7 +43190,6 @@ var require_serializer = __commonJS({ return responseBody; } function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; let element = mapper.type.element; if (!element || typeof element !== "object") { throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${objectName}`); @@ -40792,7 +43199,7 @@ var require_serializer = __commonJS({ responseBody = [responseBody]; } if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + element = serializer.modelMappers[element.type.className] ?? element; } const tempArray = []; for (let i = 0; i < responseBody.length; i++) { @@ -40820,7 +43227,6 @@ var require_serializer = __commonJS({ return void 0; } function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); if (polymorphicDiscriminator) { let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; @@ -40829,7 +43235,7 @@ var require_serializer = __commonJS({ discriminatorName = discriminatorName.replace(/\\/gi, ""); } const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; + const typeName = mapper.type.uberParent ?? mapper.type.className; if (typeof discriminatorValue === "string" && typeName) { const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); if (polymorphicMapper) { @@ -40884,7 +43290,8 @@ var require_operationHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/operationHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getOperationRequestInfo = exports2.getOperationArgumentValueFromParameter = void 0; + exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; + exports2.getOperationRequestInfo = getOperationRequestInfo; var state_js_1 = require_state2(); function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { let parameterPath = parameter.parameterPath; @@ -40930,7 +43337,6 @@ var require_operationHelpers = __commonJS({ } return value; } - exports2.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; function getPropertyFromParameterPath(parent, parameterPath) { const result = { propertyFound: false }; let i = 0; @@ -40963,7 +43369,6 @@ var require_operationHelpers = __commonJS({ } return info6; } - exports2.getOperationRequestInfo = getOperationRequestInfo; } }); @@ -40972,25 +43377,25 @@ var require_deserializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/deserializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.deserializationPolicy = exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicyName = void 0; + exports2.deserializationPolicy = deserializationPolicy; var interfaces_js_1 = require_interfaces(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializer_js_1 = require_serializer(); var operationHelpers_js_1 = require_operationHelpers(); var defaultJsonContentTypes = ["application/json", "text/json"]; var defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; exports2.deserializationPolicyName = "deserializationPolicy"; function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; const parseXML = options.parseXML; const serializerOptions = options.serializerOptions; const updatedOptions = { xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; return { @@ -41001,17 +43406,16 @@ var require_deserializationPolicy = __commonJS({ } }; } - exports2.deserializationPolicy = deserializationPolicy; function getOperationResponseMap(parsedResponse) { let result; const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { + if (!operationInfo?.operationResponseGetter) { result = operationSpec.responses[parsedResponse.status]; } else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); } } return result; @@ -41019,7 +43423,7 @@ var require_deserializationPolicy = __commonJS({ function shouldDeserializeResponse(parsedResponse) { const request = parsedResponse.request; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; + const shouldDeserialize = operationInfo?.shouldDeserialize; let result; if (shouldDeserialize === void 0) { result = true; @@ -41036,7 +43440,7 @@ var require_deserializationPolicy = __commonJS({ return parsedResponse; } const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; + const operationSpec = operationInfo?.operationSpec; if (!operationSpec || !operationSpec.responses) { return parsedResponse; } @@ -41077,7 +43481,6 @@ var require_deserializationPolicy = __commonJS({ return expectedStatusCodes.length === 0 || expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default"; } function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a; const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) ? isSuccessByStatus : !!responseSpec; if (isExpectedStatusCode) { @@ -41089,18 +43492,18 @@ var require_deserializationPolicy = __commonJS({ return { error: null, shouldReturnResponse: false }; } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; const error3 = new core_rest_pipeline_1.RestError(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); - if (!errorResponseSpec) { + if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { throw error3; } - const defaultBodyMapper = errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec.headersMapper; + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; try { if (parsedResponse.parsedBody) { const parsedBody = parsedResponse.parsedBody; @@ -41134,8 +43537,7 @@ var require_deserializationPolicy = __commonJS({ return { error: error3, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && operationResponse.bodyAsText) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { const text = operationResponse.bodyAsText; const contentType = operationResponse.headers.get("Content-Type") || ""; const contentComponents = !contentType ? [] : contentType.split(";").map((component) => component.toLowerCase()); @@ -41173,7 +43575,8 @@ var require_interfaceHelpers = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/interfaceHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getPathStringFromParameter = exports2.getStreamingResponseStatusCodes = void 0; + exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; + exports2.getPathStringFromParameter = getPathStringFromParameter; var serializer_js_1 = require_serializer(); function getStreamingResponseStatusCodes(operationSpec) { const result = /* @__PURE__ */ new Set(); @@ -41185,7 +43588,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; function getPathStringFromParameter(parameter) { const { parameterPath, mapper } = parameter; let result; @@ -41198,7 +43600,6 @@ var require_interfaceHelpers = __commonJS({ } return result; } - exports2.getPathStringFromParameter = getPathStringFromParameter; } }); @@ -41207,7 +43608,10 @@ var require_serializationPolicy = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.serializeRequestBody = exports2.serializeHeaders = exports2.serializationPolicy = exports2.serializationPolicyName = void 0; + exports2.serializationPolicyName = void 0; + exports2.serializationPolicy = serializationPolicy; + exports2.serializeHeaders = serializeHeaders; + exports2.serializeRequestBody = serializeRequestBody; var interfaces_js_1 = require_interfaces(); var operationHelpers_js_1 = require_operationHelpers(); var serializer_js_1 = require_serializer(); @@ -41219,8 +43623,8 @@ var require_serializationPolicy = __commonJS({ name: exports2.serializationPolicyName, async sendRequest(request, next) { const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; if (operationSpec && operationArguments) { serializeHeaders(request, operationArguments, operationSpec); serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); @@ -41229,9 +43633,7 @@ var require_serializationPolicy = __commonJS({ } }; } - exports2.serializationPolicy = serializationPolicy; function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; if (operationSpec.headerParameters) { for (const headerParameter of operationSpec.headerParameters) { let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); @@ -41248,24 +43650,22 @@ var require_serializationPolicy = __commonJS({ } } } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; if (customHeaders) { for (const customHeaderName of Object.keys(customHeaders)) { request.headers.set(customHeaderName, customHeaders[customHeaderName]); } } } - exports2.serializeHeaders = serializeHeaders; function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function() { throw new Error("XML serialization unsupported!"); }) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; + const serializerOptions = operationArguments.options?.serializerOptions; const updatedOptions = { xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY } }; const xmlCharKey = updatedOptions.xml.xmlCharKey; @@ -41290,7 +43690,7 @@ var require_serializationPolicy = __commonJS({ xmlCharKey }); } - } else if (typeName === serializer_js_1.MapperTypeNames.String && (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { + } else if (typeName === serializer_js_1.MapperTypeNames.String && (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { return; } else if (!isStream) { request.body = JSON.stringify(request.body); @@ -41310,7 +43710,6 @@ var require_serializationPolicy = __commonJS({ } } } - exports2.serializeRequestBody = serializeRequestBody; function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { const result = {}; @@ -41335,16 +43734,16 @@ var require_serializationPolicy = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/pipeline.js -var require_pipeline2 = __commonJS({ +var require_pipeline3 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/pipeline.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createClientPipeline = void 0; + exports2.createClientPipeline = createClientPipeline; var deserializationPolicy_js_1 = require_deserializationPolicy(); - var core_rest_pipeline_1 = require_commonjs5(); + var core_rest_pipeline_1 = require_commonjs6(); var serializationPolicy_js_1 = require_serializationPolicy(); function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); if (options.credentialOptions) { pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential: options.credentialOptions.credential, @@ -41357,7 +43756,6 @@ var require_pipeline2 = __commonJS({ }); return pipeline; } - exports2.createClientPipeline = createClientPipeline; } }); @@ -41366,8 +43764,8 @@ var require_httpClientCache = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/httpClientCache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCachedDefaultHttpClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var cachedHttpClient; function getCachedDefaultHttpClient() { if (!cachedHttpClient) { @@ -41375,16 +43773,16 @@ var require_httpClientCache = __commonJS({ } return cachedHttpClient; } - exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; } }); // node_modules/@azure/core-client/dist/commonjs/urlHelpers.js -var require_urlHelpers = __commonJS({ +var require_urlHelpers2 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/urlHelpers.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.appendQueryParams = exports2.getRequestUrl = void 0; + exports2.getRequestUrl = getRequestUrl; + exports2.appendQueryParams = appendQueryParams; var operationHelpers_js_1 = require_operationHelpers(); var interfaceHelpers_js_1 = require_interfaceHelpers(); var CollectionFormatToDelimiterMap = { @@ -41414,7 +43812,6 @@ var require_urlHelpers = __commonJS({ requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); return requestUrl; } - exports2.getRequestUrl = getRequestUrl; function replaceAll(input, replacements) { let result = input; for (const [searchValue, replaceValue] of replacements) { @@ -41423,9 +43820,8 @@ var require_urlHelpers = __commonJS({ return result; } function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.urlParameters?.length) { for (const urlParameter of operationSpec.urlParameters) { let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); @@ -41468,10 +43864,9 @@ var require_urlHelpers = __commonJS({ return parsedUrl.toString(); } function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; const result = /* @__PURE__ */ new Map(); const sequenceParams = /* @__PURE__ */ new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { + if (operationSpec.queryParameters?.length) { for (const queryParameter of operationSpec.queryParameters) { if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { sequenceParams.add(queryParameter.mapper.serializedName); @@ -41580,17 +43975,16 @@ var require_urlHelpers = __commonJS({ parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return parsedUrl.toString(); } - exports2.appendQueryParams = appendQueryParams; } }); // node_modules/@azure/core-client/dist/commonjs/log.js -var require_log2 = __commonJS({ +var require_log4 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/log.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.logger = void 0; - var logger_1 = require_dist(); + var logger_1 = require_commonjs2(); exports2.logger = (0, logger_1.createClientLogger)("core-client"); } }); @@ -41601,31 +43995,51 @@ var require_serviceClient = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ServiceClient = void 0; - var core_rest_pipeline_1 = require_commonjs5(); - var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils5(); + var core_rest_pipeline_1 = require_commonjs6(); + var pipeline_js_1 = require_pipeline3(); + var utils_js_1 = require_utils6(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); - var urlHelpers_js_1 = require_urlHelpers(); + var urlHelpers_js_1 = require_urlHelpers2(); var interfaceHelpers_js_1 = require_interfaceHelpers(); - var log_js_1 = require_log2(); + var log_js_1 = require_log4(); var ServiceClient = class { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; /** * The ServiceClient constructor - * @param credential - The credentials used for authentication with the service. * @param options - The service client options that govern the behavior of the client. */ constructor(options = {}) { - var _a, _b; this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; + this._endpoint = options.endpoint ?? options.baseUri; if (options.baseUri) { log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); } this._allowInsecureConnection = options.allowInsecureConnection; this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { + if (options.additionalPolicies?.length) { for (const { policy, position } of options.additionalPolicies) { const afterPhase = position === "perRetry" ? "Sign" : void 0; this.pipeline.addPolicy(policy, { @@ -41699,16 +44113,16 @@ var require_serviceClient = __commonJS({ try { const rawResponse = await this.sendRequest(request); const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse); } return flatResponse; } catch (error3) { - if (typeof error3 === "object" && (error3 === null || error3 === void 0 ? void 0 : error3.response)) { + if (typeof error3 === "object" && error3?.response) { const rawResponse = error3.response; const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error3.statusCode] || operationSpec.responses["default"]); error3.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { + if (options?.onResponse) { options.onResponse(rawResponse, flatResponse, error3); } } @@ -41720,7 +44134,10 @@ var require_serviceClient = __commonJS({ function createDefaultPipeline(options) { const credentialScopes = getCredentialScopes(options); const credentialOptions = options.credential && credentialScopes ? { credentialScopes, credential: options.credential } : void 0; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions + }); } function getCredentialScopes(options) { if (options.credentialScopes) { @@ -41745,18 +44162,18 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/authorizeRequestOnClaimChallenge.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.authorizeRequestOnClaimChallenge = exports2.parseCAEChallenge = void 0; - var log_js_1 = require_log2(); + exports2.parseCAEChallenge = parseCAEChallenge; + exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; + var log_js_1 = require_log4(); var base64_js_1 = require_base64(); function parseCAEChallenge(challenges) { const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); return bearerChallenges.map((challenge) => { const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); }); } - exports2.parseCAEChallenge = parseCAEChallenge; async function authorizeRequestOnClaimChallenge(onChallengeOptions) { const { scopes, response } = onChallengeOptions; const logger = onChallengeOptions.logger || log_js_1.logger; @@ -41777,10 +44194,9 @@ var require_authorizeRequestOnClaimChallenge = __commonJS({ if (!accessToken) { return false; } - onChallengeOptions.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } - exports2.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; } }); @@ -41815,11 +44231,14 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ if (!tenantId) { return false; } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId + }); if (!accessToken) { return false; } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${accessToken.token}`); + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); return true; } return false; @@ -41857,7 +44276,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ const bearerChallenge = challenge.slice("Bearer ".length); const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - return keyValuePairs.reduce((a, b) => Object.assign(Object.assign({}, a), b), {}); + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } function requestToOptions(request) { return { @@ -41872,7 +44291,7 @@ var require_authorizeRequestOnTenantChallenge = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/index.js -var require_commonjs7 = __commonJS({ +var require_commonjs8 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41888,7 +44307,7 @@ var require_commonjs7 = __commonJS({ Object.defineProperty(exports2, "ServiceClient", { enumerable: true, get: function() { return serviceClient_js_1.ServiceClient; } }); - var pipeline_js_1 = require_pipeline2(); + var pipeline_js_1 = require_pipeline3(); Object.defineProperty(exports2, "createClientPipeline", { enumerable: true, get: function() { return pipeline_js_1.createClientPipeline; } }); @@ -41929,8 +44348,11 @@ var require_util8 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpHeaders = exports2.toHttpHeadersLike = exports2.toWebResourceLike = exports2.toPipelineRequest = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.HttpHeaders = void 0; + exports2.toPipelineRequest = toPipelineRequest; + exports2.toWebResourceLike = toWebResourceLike; + exports2.toHttpHeadersLike = toHttpHeadersLike; + var core_rest_pipeline_1 = require_commonjs6(); var originalRequestSymbol = /* @__PURE__ */ Symbol("Original PipelineRequest"); var originalClientRequestSymbol = /* @__PURE__ */ Symbol.for("@azure/core-client original request"); function toPipelineRequest(webResource, options = {}) { @@ -41955,7 +44377,9 @@ var require_util8 = __commonJS({ onDownloadProgress: webResource.onDownloadProgress, onUploadProgress: webResource.onUploadProgress, proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides }); if (options.originalRequest) { newRequest[originalClientRequestSymbol] = options.originalRequest; @@ -41963,10 +44387,8 @@ var require_util8 = __commonJS({ return newRequest; } } - exports2.toPipelineRequest = toPipelineRequest; function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; + const originalRequest = options?.originalRequest ?? request; const webResource = { url: request.url, method: request.method, @@ -41982,6 +44404,8 @@ var require_util8 = __commonJS({ onUploadProgress: request.onUploadProgress, proxySettings: request.proxySettings, streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, clone() { throw new Error("Cannot clone a non-proxied WebResourceLike"); }, @@ -41991,7 +44415,7 @@ var require_util8 = __commonJS({ validateRequestProperties() { } }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(webResource, { get(target, prop, receiver) { if (prop === originalRequestSymbol) { @@ -42022,7 +44446,9 @@ var require_util8 = __commonJS({ "onDownloadProgress", "onUploadProgress", "proxySettings", - "streamResponseStatusCodes" + "streamResponseStatusCodes", + "agent", + "requestOverrides" ]; if (typeof prop === "string" && passThroughProps.includes(prop)) { request[prop] = value; @@ -42034,15 +44460,14 @@ var require_util8 = __commonJS({ return webResource; } } - exports2.toWebResourceLike = toWebResourceLike; function toHttpHeadersLike(headers) { return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - exports2.toHttpHeadersLike = toHttpHeadersLike; function getHeaderKey(headerName) { return headerName.toLowerCase(); } var HttpHeaders = class _HttpHeaders { + _headersMap; constructor(rawHeaders) { this._headersMap = {}; if (rawHeaders) { @@ -42171,14 +44596,15 @@ var require_response2 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/response.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPipelineResponse = exports2.toCompatResponse = void 0; - var core_rest_pipeline_1 = require_commonjs5(); + exports2.toCompatResponse = toCompatResponse; + exports2.toPipelineResponse = toPipelineResponse; + var core_rest_pipeline_1 = require_commonjs6(); var util_js_1 = require_util8(); var originalResponse = /* @__PURE__ */ Symbol("Original FullOperationResponse"); function toCompatResponse(response, options) { let request = (0, util_js_1.toWebResourceLike)(response.request); let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { + if (options?.createProxy) { return new Proxy(response, { get(target, prop, receiver) { if (prop === "headers") { @@ -42200,13 +44626,13 @@ var require_response2 = __commonJS({ } }); } else { - return Object.assign(Object.assign({}, response), { + return { + ...response, request, headers - }); + }; } } - exports2.toCompatResponse = toCompatResponse; function toPipelineResponse(compatResponse) { const extendedCompatResponse = compatResponse; const response = extendedCompatResponse[originalResponse]; @@ -42215,10 +44641,13 @@ var require_response2 = __commonJS({ response.headers = headers; return response; } else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request) + }; } } - exports2.toPipelineResponse = toPipelineResponse; } }); @@ -42229,17 +44658,16 @@ var require_extendedClient = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExtendedServiceClient = void 0; var disableKeepAlivePolicy_js_1 = require_disableKeepAlivePolicy(); - var core_rest_pipeline_1 = require_commonjs5(); - var core_client_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); var response_js_1 = require_response2(); var ExtendedServiceClient = class extends core_client_1.ServiceClient { constructor(options) { - var _a, _b; super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + if (options.keepAliveOptions?.enable === false && !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { + if (options.redirectOptions?.handleRedirects === false) { this.pipeline.removePolicy({ name: core_rest_pipeline_1.redirectPolicyName }); @@ -42253,8 +44681,7 @@ var require_extendedClient = __commonJS({ * @returns */ async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; + const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; function onResponse(rawResponse, flatResponse, error3) { lastResponse = rawResponse; @@ -42262,7 +44689,10 @@ var require_extendedClient = __commonJS({ userProvidedCallBack(rawResponse, flatResponse, error3); } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); + operationArguments.options = { + ...operationArguments.options, + onResponse + }; const result = await super.sendOperationRequest(operationArguments, operationSpec); if (lastResponse) { Object.defineProperty(result, "_response", { @@ -42281,7 +44711,8 @@ var require_requestPolicyFactoryPolicy = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/policies/requestPolicyFactoryPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createRequestPolicyFactoryPolicy = exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.requestPolicyFactoryPolicyName = exports2.HttpPipelineLogLevel = void 0; + exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; var util_js_1 = require_util8(); var response_js_1 = require_response2(); var HttpPipelineLogLevel; @@ -42319,7 +44750,6 @@ var require_requestPolicyFactoryPolicy = __commonJS({ } }; } - exports2.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; } }); @@ -42328,7 +44758,7 @@ var require_httpClientAdapter = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/httpClientAdapter.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertHttpClient = void 0; + exports2.convertHttpClient = convertHttpClient; var response_js_1 = require_response2(); var util_js_1 = require_util8(); function convertHttpClient(requestPolicyClient) { @@ -42339,12 +44769,11 @@ var require_httpClientAdapter = __commonJS({ } }; } - exports2.convertHttpClient = convertHttpClient; } }); // node_modules/@azure/core-http-compat/dist/commonjs/index.js -var require_commonjs8 = __commonJS({ +var require_commonjs9 = __commonJS({ "node_modules/@azure/core-http-compat/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -42378,1680 +44807,837 @@ var require_commonjs8 = __commonJS({ } }); -// node_modules/fast-xml-parser/src/util.js -var require_util9 = __commonJS({ - "node_modules/fast-xml-parser/src/util.js"(exports2) { - "use strict"; - var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*"; - var regexName = new RegExp("^" + nameRegexp + "$"); - var getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; - }; - var isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === "undefined"); - }; - exports2.isExist = function(v) { - return typeof v !== "undefined"; - }; - exports2.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; - }; - exports2.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); - const len = keys.length; - for (let i = 0; i < len; i++) { - if (arrayMode === "strict") { - target[keys[i]] = [a[keys[i]]]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } - }; - exports2.getValue = function(v) { - if (exports2.isExist(v)) { - return v; - } else { - return ""; - } - }; - exports2.isName = isName; - exports2.getAllMatches = getAllMatches; - exports2.nameRegexp = nameRegexp; - } -}); - -// node_modules/fast-xml-parser/src/validator.js -var require_validator = __commonJS({ - "node_modules/fast-xml-parser/src/validator.js"(exports2) { - "use strict"; - var util = require_util9(); - var defaultOptions = { - allowBooleanAttributes: false, - //A tag can have attributes without any value - unpairedTags: [] - }; - exports2.validate = function(xmlData, options) { - options = Object.assign({}, defaultOptions, options); - const tags = []; - let tagFound = false; - let reachedRoot = false; - if (xmlData[0] === "\uFEFF") { - xmlData = xmlData.substr(1); - } - for (let i = 0; i < xmlData.length; i++) { - if (xmlData[i] === "<" && xmlData[i + 1] === "?") { - i += 2; - i = readPI(xmlData, i); - if (i.err) return i; - } else if (xmlData[i] === "<") { - let tagStartPos = i; - i++; - if (xmlData[i] === "!") { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === "/") { - closingTag = true; - i++; - } - let tagName = ""; - for (; i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== " " && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substring(0, tagName.length - 1); - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '" + tagName + "' is an invalid name."; - } - return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i)); - } - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === "/") { - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - } else { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject( - "InvalidTag", - "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", - getLineNumberForPosition(xmlData, tagStartPos) - ); - } - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - if (reachedRoot === true) { - return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i)); - } else if (options.unpairedTags.indexOf(tagName) !== -1) { - } else { - tags.push({ tagName, tagStartPos }); - } - tagFound = true; - } - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "!") { - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i + 1] === "?") { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else { - break; - } - } else if (xmlData[i] === "&") { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } else { - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } - if (xmlData[i] === "<") { - i--; - } - } - } else { - if (isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - if (!tagFound) { - return getErrorObject("InvalidXml", "Start tag expected.", 1); - } else if (tags.length == 1) { - return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - } else if (tags.length > 0) { - return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }); - } - return true; - }; - function isWhiteSpace(char) { - return char === " " || char === " " || char === "\n" || char === "\r"; - } - function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == "?" || xmlData[i] == " ") { - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === "xml") { - return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") { - i++; - break; - } else { - continue; - } - } - } - return i; - } - function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") { - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - angleBracketsCount++; - } else if (xmlData[i] === ">") { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") { - i += 2; - break; - } - } - } - return i; - } - var doubleQuote = '"'; - var singleQuote = "'"; - function readAttributeStr(xmlData, i) { - let attrStr = ""; - let startChar = ""; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === "") { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - } else { - startChar = ""; - } - } else if (xmlData[i] === ">") { - if (startChar === "") { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== "") { - return false; - } - return { - value: attrStr, - index: i, - tagClosed - }; - } - var validAttrStrRegxp = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); - function validateAttributeString(attrStr, options) { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) { - return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) { - return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i])); - } - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - attrNames[attrName] = 1; - } else { - return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; - } - function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === "x") { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ";") - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; - } - function validateAmpersand(xmlData, i) { - i++; - if (xmlData[i] === ";") - return -1; - if (xmlData[i] === "#") { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ";") - break; - return -1; - } - return i; - } - function getErrorObject(code, message, lineNumber) { - return { - err: { - code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col - } - }; - } - function validateAttrName(attrName) { - return util.isName(attrName); - } - function validateTagName(tagname) { - return util.isName(tagname); - } - function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; - } - function getPositionFromMatch(match) { - return match.startIndex + match[1].length; - } - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js -var require_OptionsBuilder = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"(exports2) { - var defaultOptions = { - preserveOrder: false, - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - removeNSPrefix: false, - // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, - //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, - //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val2) { - return val2; - }, - attributeValueProcessor: function(attrName, val2) { - return val2; - }, - stopNodes: [], - //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs) { - return tagName; - } - // skipEmptyListItem: false - }; - var buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); - }; - exports2.buildOptions = buildOptions; - exports2.defaultOptions = defaultOptions; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/xmlNode.js -var require_xmlNode = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"(exports2, module2) { - "use strict"; - var XmlNode = class { - constructor(tagname) { - this.tagname = tagname; - this.child = []; - this[":@"] = {}; - } - add(key, val2) { - if (key === "__proto__") key = "#__proto__"; - this.child.push({ [key]: val2 }); - } - addChild(node) { - if (node.tagname === "__proto__") node.tagname = "#__proto__"; - if (node[":@"] && Object.keys(node[":@"]).length > 0) { - this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] }); - } else { - this.child.push({ [node.tagname]: node.child }); - } - } - }; - module2.exports = XmlNode; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js -var require_DocTypeReader = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"(exports2, module2) { - var util = require_util9(); - function readDocType(xmlData, i) { - const entities = {}; - if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") { - i = i + 9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<" && !comment) { - if (hasBody && isEntity(xmlData, i)) { - i += 7; - [entityName, val, i] = readEntityExp(xmlData, i + 1); - if (val.indexOf("&") === -1) - entities[validateEntityName(entityName)] = { - regx: RegExp(`&${entityName};`, "g"), - val - }; - } else if (hasBody && isElement(xmlData, i)) i += 8; - else if (hasBody && isAttlist(xmlData, i)) i += 8; - else if (hasBody && isNotation(xmlData, i)) i += 9; - else if (isComment) comment = true; - else throw new Error("Invalid DOCTYPE"); - angleBracketsCount++; - exp = ""; - } else if (xmlData[i] === ">") { - if (comment) { - if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") { - comment = false; - angleBracketsCount--; - } - } else { - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - } else if (xmlData[i] === "[") { - hasBody = true; - } else { - exp += xmlData[i]; - } - } - if (angleBracketsCount !== 0) { - throw new Error(`Unclosed DOCTYPE`); - } - } else { - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return { entities, i }; - } - function readEntityExp(xmlData, i) { - let entityName2 = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) { - entityName2 += xmlData[i]; - } - entityName2 = entityName2.trim(); - if (entityName2.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - const startChar = xmlData[i++]; - let val2 = ""; - for (; i < xmlData.length && xmlData[i] !== startChar; i++) { - val2 += xmlData[i]; - } - return [entityName2, val2, i]; - } - function isComment(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-") return true; - return false; - } - function isEntity(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y") return true; - return false; - } - function isElement(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T") return true; - return false; - } - function isAttlist(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T") return true; - return false; - } - function isNotation(xmlData, i) { - if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N") return true; - return false; - } - function validateEntityName(name) { - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); - } - module2.exports = readDocType; - } -}); - -// node_modules/strnum/strnum.js -var require_strnum = __commonJS({ - "node_modules/strnum/strnum.js"(exports2, module2) { - var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; - var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; - if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; - } - if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; - } - var consider = { - hex: true, - leadingZeros: true, - decimalPoint: ".", - eNotation: true - //skipLike: /regex/ - }; - function toNumber2(str2, options = {}) { - options = Object.assign({}, consider, options); - if (!str2 || typeof str2 !== "string") return str2; - let trimmedStr = str2.trim(); - if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str2; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - } else { - const match = numRegex.exec(trimmedStr); - if (match) { - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); - const eNotation = match[4] || match[6]; - if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str2; - else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str2; - else { - const num = Number(trimmedStr); - const numStr = "" + num; - if (numStr.search(/[eE]/) !== -1) { - if (options.eNotation) return num; - else return str2; - } else if (eNotation) { - if (options.eNotation) return num; - else return str2; - } else if (trimmedStr.indexOf(".") !== -1) { - if (numStr === "0" && numTrimmedByZeros === "") return num; - else if (numStr === numTrimmedByZeros) return num; - else if (sign && numStr === "-" + numTrimmedByZeros) return num; - else return str2; - } - if (leadingZeros) { - if (numTrimmedByZeros === numStr) return num; - else if (sign + numTrimmedByZeros === numStr) return num; - else return str2; - } - if (trimmedStr === numStr) return num; - else if (trimmedStr === sign + numStr) return num; - return str2; - } - } else { - return str2; - } - } - } - function trimZeros(numStr) { - if (numStr && numStr.indexOf(".") !== -1) { - numStr = numStr.replace(/0+$/, ""); - if (numStr === ".") numStr = "0"; - else if (numStr[0] === ".") numStr = "0" + numStr; - else if (numStr[numStr.length - 1] === ".") numStr = numStr.substr(0, numStr.length - 1); - return numStr; - } - return numStr; - } - module2.exports = toNumber2; - } -}); - -// node_modules/fast-xml-parser/src/ignoreAttributes.js -var require_ignoreAttributes = __commonJS({ - "node_modules/fast-xml-parser/src/ignoreAttributes.js"(exports2, module2) { - function getIgnoreAttributesFn(ignoreAttributes) { - if (typeof ignoreAttributes === "function") { - return ignoreAttributes; - } - if (Array.isArray(ignoreAttributes)) { - return (attrName) => { - for (const pattern of ignoreAttributes) { - if (typeof pattern === "string" && attrName === pattern) { - return true; - } - if (pattern instanceof RegExp && pattern.test(attrName)) { - return true; - } - } - }; - } - return () => false; - } - module2.exports = getIgnoreAttributesFn; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js -var require_OrderedObjParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"(exports2, module2) { - "use strict"; - var util = require_util9(); - var xmlNode = require_xmlNode(); - var readDocType = require_DocTypeReader(); - var toNumber2 = require_strnum(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var OrderedObjParser = class { - constructor(options) { - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos": { regex: /&(apos|#39|#x27);/g, val: "'" }, - "gt": { regex: /&(gt|#62|#x3E);/g, val: ">" }, - "lt": { regex: /&(lt|#60|#x3C);/g, val: "<" }, - "quot": { regex: /&(quot|#34|#x22);/g, val: '"' } - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent": { regex: /&(cent|#162);/g, val: "\xA2" }, - "pound": { regex: /&(pound|#163);/g, val: "\xA3" }, - "yen": { regex: /&(yen|#165);/g, val: "\xA5" }, - "euro": { regex: /&(euro|#8364);/g, val: "\u20AC" }, - "copyright": { regex: /&(copy|#169);/g, val: "\xA9" }, - "reg": { regex: /&(reg|#174);/g, val: "\xAE" }, - "inr": { regex: /&(inr|#8377);/g, val: "\u20B9" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str2) => String.fromCharCode(Number.parseInt(str2, 16)) } - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - } - }; - function addExternalEntities(externalEntities) { - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&" + ent + ";", "g"), - val: externalEntities[ent] - }; - } - } - function parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val2 !== void 0) { - if (this.options.trimValues && !dontTrim) { - val2 = val2.trim(); - } - if (val2.length > 0) { - if (!escapeEntities) val2 = this.replaceEntitiesValue(val2); - const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode); - if (newval === null || newval === void 0) { - return val2; - } else if (typeof newval !== typeof val2 || newval !== val2) { - return newval; - } else if (this.options.trimValues) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - const trimmedVal = val2.trim(); - if (trimmedVal === val2) { - return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions); - } else { - return val2; - } - } - } - } - } - function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(":"); - const prefix = tagname.charAt(0) === "/" ? "/" : ""; - if (tags[0] === "xmlns") { - return ""; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; - } - var attrsRegx = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); - function buildAttributesMap(attrStr, jPath, tagName) { - if (this.options.ignoreAttributes !== true && typeof attrStr === "string") { - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - if (this.ignoreAttributesFn(attrName, jPath)) { - continue; - } - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if (aName === "__proto__") aName = "#__proto__"; - if (oldVal !== void 0) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if (newVal === null || newVal === void 0) { - attrs[aName] = oldVal; - } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) { - attrs[aName] = newVal; - } else { - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs; - } - } - var parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - const xmlObj = new xmlNode("!xml"); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for (let i = 0; i < xmlData.length; i++) { - const ch = xmlData[i]; - if (ch === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."); - let tagName = xmlData.substring(i + 2, closeIndex).trim(); - if (this.options.removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - } - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode) { - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } - const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1); - if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) { - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0; - if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) { - propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1); - this.tagsNodeStack.pop(); - } else { - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); - currentNode = this.tagsNodeStack.pop(); - textData = ""; - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - let tagData = readTagExp(xmlData, i, false, "?>"); - if (!tagData) throw new Error("Pi Tag is not closed."); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) { - } else { - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath); - } - i = tagData.closeIndex + 1; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed."); - if (this.options.commentPropName) { - const comment = xmlData.substring(i + 4, endIndex - 2); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]); - } - i = endIndex; - } else if (xmlData.substr(i + 1, 2) === "!D") { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9, closeIndex); - textData = this.saveTextToParentTag(textData, currentNode, jPath); - let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if (val2 == void 0) val2 = ""; - if (this.options.cdataPropName) { - currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]); - } else { - currentNode.add(this.options.textNodeName, val2); - } - i = closeIndex + 2; - } else { - let result = readTagExp(xmlData, i, this.options.removeNSPrefix); - let tagName = result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - if (currentNode && textData) { - if (currentNode.tagname !== "!xml") { - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } - const lastTag = currentNode; - if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) { - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if (tagName !== xmlObj.tagname) { - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } else if (this.options.unpairedTags.indexOf(tagName) !== -1) { - i = result.closeIndex; - } else { - const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if (!result2) throw new Error(`Unexpected end of ${rawTagName}`); - i = result2.i; - tagContent = result2.tagContent; - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if (tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - this.addChild(currentNode, childNode, jPath); - } else { - if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) { - if (tagName[tagName.length - 1] === "/") { - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - } else { - tagExp = tagExp.substr(0, tagExp.length - 1); - } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - const childNode = new xmlNode(tagName); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } else { - const childNode = new xmlNode(tagName); - this.tagsNodeStack.push(currentNode); - if (tagName !== tagExp && attrExpPresent) { - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - } else { - textData += xmlData[i]; - } - } - return xmlObj.child; - }; - function addChild(currentNode, childNode, jPath) { - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]); - if (result === false) { - } else if (typeof result === "string") { - childNode.tagname = result; - currentNode.addChild(childNode); - } else { - currentNode.addChild(childNode); - } - } - var replaceEntitiesValue = function(val2) { - if (this.options.processEntities) { - for (let entityName2 in this.docTypeEntities) { - const entity = this.docTypeEntities[entityName2]; - val2 = val2.replace(entity.regx, entity.val); - } - for (let entityName2 in this.lastEntities) { - const entity = this.lastEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - if (this.options.htmlEntities) { - for (let entityName2 in this.htmlEntities) { - const entity = this.htmlEntities[entityName2]; - val2 = val2.replace(entity.regex, entity.val); - } - } - val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val); - } - return val2; - }; - function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { - if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0; - textData = this.parseTextData( - textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode - ); - if (textData !== void 0 && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; - } - function isItStopNode(stopNodes, jPath, currentTagName) { - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true; - } - return false; - } - function tagExpWithClosingIndex(xmlData, i, closingChar = ">") { - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = ""; - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if (closingChar[1]) { - if (xmlData[index + 1] === closingChar[1]) { - return { - data: tagExp, - index - }; - } - } else { - return { - data: tagExp, - index - }; - } - } else if (ch === " ") { - ch = " "; - } - tagExp += ch; - } - } - function findClosingIndex(xmlData, str2, i, errMsg) { - const closingIndex = xmlData.indexOf(str2, i); - if (closingIndex === -1) { - throw new Error(errMsg); - } else { - return closingIndex + str2.length - 1; - } - } - function readTagExp(xmlData, i, removeNSPrefix, closingChar = ">") { - const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar); - if (!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if (separatorIndex !== -1) { - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - const rawTagName = tagName; - if (removeNSPrefix) { - const colonIndex = tagName.indexOf(":"); - if (colonIndex !== -1) { - tagName = tagName.substr(colonIndex + 1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } - } - return { - tagName, - tagExp, - closeIndex, - attrExpPresent, - rawTagName - }; - } - function readStopNodeData(xmlData, tagName, i) { - const startIndex = i; - let openTagCount = 1; - for (; i < xmlData.length; i++) { - if (xmlData[i] === "<") { - if (xmlData[i + 1] === "/") { - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i + 2, closeIndex).trim(); - if (closeTagName === tagName) { - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i: closeIndex - }; - } - } - i = closeIndex; - } else if (xmlData[i + 1] === "?") { - const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 3) === "!--") { - const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed."); - i = closeIndex; - } else if (xmlData.substr(i + 1, 2) === "![") { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i = closeIndex; - } else { - const tagData = readTagExp(xmlData, i, ">"); - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") { - openTagCount++; - } - i = tagData.closeIndex; - } - } - } - } - } - function parseValue(val2, shouldParse, options) { - if (shouldParse && typeof val2 === "string") { - const newval = val2.trim(); - if (newval === "true") return true; - else if (newval === "false") return false; - else return toNumber2(val2, options); - } else { - if (util.isExist(val2)) { - return val2; - } else { - return ""; - } - } - } - module2.exports = OrderedObjParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/node2json.js -var require_node2json = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports2) { - "use strict"; - function prettify(node, options) { - return compress(node, options); - } - function compress(arr, options, jPath) { - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if (jPath === void 0) newJpath = property; - else newJpath = jPath + "." + property; - if (property === options.textNodeName) { - if (text === void 0) text = tagObj[property]; - else text += "" + tagObj[property]; - } else if (property === void 0) { - continue; - } else if (tagObj[property]) { - let val2 = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val2, options); - if (tagObj[":@"]) { - assignAttributes(val2, tagObj[":@"], newJpath, options); - } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) { - val2 = val2[options.textNodeName]; - } else if (Object.keys(val2).length === 0) { - if (options.alwaysCreateTextNode) val2[options.textNodeName] = ""; - else val2 = ""; - } - if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) { - if (!Array.isArray(compressedObj[property])) { - compressedObj[property] = [compressedObj[property]]; - } - compressedObj[property].push(val2); - } else { - if (options.isArray(property, newJpath, isLeaf)) { - compressedObj[property] = [val2]; - } else { - compressedObj[property] = val2; - } - } - } - } - if (typeof text === "string") { - if (text.length > 0) compressedObj[options.textNodeName] = text; - } else if (text !== void 0) compressedObj[options.textNodeName] = text; - return compressedObj; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (key !== ":@") return key; - } - } - function assignAttributes(obj, attrMap, jpath, options) { - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [attrMap[atrrName]]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } - } - } - function isLeafTag(obj, options) { - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - if (propCount === 0) { - return true; - } - if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) { - return true; - } - return false; - } - exports2.prettify = prettify; - } -}); - -// node_modules/fast-xml-parser/src/xmlparser/XMLParser.js -var require_XMLParser = __commonJS({ - "node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"(exports2, module2) { - var { buildOptions } = require_OptionsBuilder(); - var OrderedObjParser = require_OrderedObjParser(); - var { prettify } = require_node2json(); - var validator = require_validator(); - var XMLParser = class { - constructor(options) { - this.externalEntities = {}; - this.options = buildOptions(options); - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData, validationOption) { - if (typeof xmlData === "string") { - } else if (xmlData.toString) { - xmlData = xmlData.toString(); - } else { - throw new Error("XML data is accepted in String or Bytes[] form."); - } - if (validationOption) { - if (validationOption === true) validationOption = {}; - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`); - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if (this.options.preserveOrder || orderedResult === void 0) return orderedResult; - else return prettify(orderedResult, this.options); - } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value) { - if (value.indexOf("&") !== -1) { - throw new Error("Entity value can't have '&'"); - } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) { - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); - } else if (value === "&") { - throw new Error("An entity with value '&' is not permitted"); - } else { - this.externalEntities[key] = value; - } - } - }; - module2.exports = XMLParser; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js -var require_orderedJs2Xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"(exports2, module2) { - var EOL = "\n"; - function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); - } - function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if (tagName === void 0) continue; - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName; - else newJPath = `${jPath}.${tagName}`; - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr2 = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; - } - return xmlStr; - } - function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } - } - function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if (!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; - } - function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; - } - function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - } - module2.exports = toXml; - } -}); - -// node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js -var require_json2xml = __commonJS({ - "node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js"(exports2, module2) { - "use strict"; - var buildFromOrderedJs = require_orderedJs2Xml(); - var getIgnoreAttributesFn = require_ignoreAttributes(); - var defaultOptions = { - attributeNamePrefix: "@_", - attributesGroupName: false, - textNodeName: "#text", - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: " ", - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" }, - //it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("'", "g"), val: "'" }, - { regex: new RegExp('"', "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false - }; - function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes === true || this.options.attributesGroupName) { - this.isAttribute = function() { - return false; - }; - } else { - this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes); - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - this.processTextOrObjNode = processTextOrObjNode; - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = ">\n"; - this.newLine = "\n"; - } else { - this.indentate = function() { - return ""; - }; - this.tagEndChar = ">"; - this.newLine = ""; - } - } - Builder.prototype.build = function(jObj) { - if (this.options.preserveOrder) { - return buildFromOrderedJs(jObj, this.options); - } else { - if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) { - jObj = { - [this.options.arrayNodeName]: jObj - }; - } - return this.j2x(jObj, 0, []).val; - } - }; - Builder.prototype.j2x = function(jObj, level, ajPath) { - let attrStr = ""; - let val2 = ""; - const jPath = ajPath.join("."); - for (let key in jObj) { - if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === "undefined") { - if (this.isAttribute(key)) { - val2 += ""; - } - } else if (jObj[key] === null) { - if (this.isAttribute(key)) { - val2 += ""; - } else if (key[0] === "?") { - val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - } else { - val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } - } else if (jObj[key] instanceof Date) { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } else if (typeof jObj[key] !== "object") { - const attr = this.isAttribute(key); - if (attr && !this.ignoreAttributesFn(attr, jPath)) { - attrStr += this.buildAttrPairStr(attr, "" + jObj[key]); - } else if (!attr) { - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, "" + jObj[key]); - val2 += this.replaceEntitiesValue(newval); - } else { - val2 += this.buildTextValNode(jObj[key], key, "", level); - } - } - } else if (Array.isArray(jObj[key])) { - const arrLen = jObj[key].length; - let listTagVal = ""; - let listTagAttr = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === "undefined") { - } else if (item === null) { - if (key[0] === "?") val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar; - else val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar; - } else if (typeof item === "object") { - if (this.options.oneListGroup) { - const result = this.j2x(item, level + 1, ajPath.concat(key)); - listTagVal += result.val; - if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) { - listTagAttr += result.attrStr; - } - } else { - listTagVal += this.processTextOrObjNode(item, key, level, ajPath); - } - } else { - if (this.options.oneListGroup) { - let textValue = this.options.tagValueProcessor(key, item); - textValue = this.replaceEntitiesValue(textValue); - listTagVal += textValue; - } else { - listTagVal += this.buildTextValNode(item, key, "", level); - } - } - } - if (this.options.oneListGroup) { - listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level); - } - val2 += listTagVal; - } else { - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]); - } - } else { - val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath); - } - } - } - return { attrStr, val: val2 }; - }; - Builder.prototype.buildAttrPairStr = function(attrName, val2) { - val2 = this.options.attributeValueProcessor(attrName, "" + val2); - val2 = this.replaceEntitiesValue(val2); - if (this.options.suppressBooleanAttributes && val2 === "true") { - return " " + attrName; - } else return " " + attrName + '="' + val2 + '"'; - }; - function processTextOrObjNode(object, key, level, ajPath) { - const result = this.j2x(object, level + 1, ajPath.concat(key)); - if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } - } - Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) { - if (val2 === "") { - if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - else { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - } else { - let tagEndExp = "" + val2 + tagEndExp; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - } else { - return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp; - } - } - }; - Builder.prototype.closeTag = function(key) { - let closeTag = ""; - if (this.options.unpairedTags.indexOf(key) !== -1) { - if (!this.options.suppressUnpairedNode) closeTag = "/"; - } else if (this.options.suppressEmptyNode) { - closeTag = "/"; - } else { - closeTag = `>` + this.newLine; - } else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - } else if (key[0] === "?") { - return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar; - } else { - let textValue = this.options.tagValueProcessor(key, val2); - textValue = this.replaceEntitiesValue(textValue); - if (textValue === "") { - return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar; - } else { - return this.indentate(level) + "<" + key + attrStr + ">" + textValue + " 0 && this.options.processEntities) { - for (let i = 0; i < this.options.entities.length; i++) { - const entity = this.options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); - } - } - return textValue; - }; - function indentate(level) { - return this.options.indentBy.repeat(level); - } - function isAttribute(name) { - if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } - } - module2.exports = Builder; - } -}); - -// node_modules/fast-xml-parser/src/fxp.js +// node_modules/fast-xml-parser/lib/fxp.cjs var require_fxp = __commonJS({ - "node_modules/fast-xml-parser/src/fxp.js"(exports2, module2) { - "use strict"; - var validator = require_validator(); - var XMLParser = require_XMLParser(); - var XMLBuilder = require_json2xml(); - module2.exports = { - XMLParser, - XMLValidator: validator, - XMLBuilder - }; + "node_modules/fast-xml-parser/lib/fxp.cjs"(exports2, module2) { + (() => { + "use strict"; + var t = { d: (e2, i2) => { + for (var n2 in i2) t.o(i2, n2) && !t.o(e2, n2) && Object.defineProperty(e2, n2, { enumerable: true, get: i2[n2] }); + }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true }); + } }, e = {}; + t.r(e), t.d(e, { XMLBuilder: () => lt, XMLParser: () => tt, XMLValidator: () => pt }); + const i = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", n = new RegExp("^[" + i + "][" + i + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"); + function s(t2, e2) { + const i2 = []; + let n2 = e2.exec(t2); + for (; n2; ) { + const s2 = []; + s2.startIndex = e2.lastIndex - n2[0].length; + const r2 = n2.length; + for (let t3 = 0; t3 < r2; t3++) s2.push(n2[t3]); + i2.push(s2), n2 = e2.exec(t2); + } + return i2; + } + const r = function(t2) { + return !(null == n.exec(t2)); + }, o = { allowBooleanAttributes: false, unpairedTags: [] }; + function a(t2, e2) { + e2 = Object.assign({}, o, e2); + const i2 = []; + let n2 = false, s2 = false; + "\uFEFF" === t2[0] && (t2 = t2.substr(1)); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2] && "?" === t2[o2 + 1]) { + if (o2 += 2, o2 = u(t2, o2), o2.err) return o2; + } else { + if ("<" !== t2[o2]) { + if (l(t2[o2])) continue; + return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", b(t2, o2)); + } + { + let a2 = o2; + if (o2++, "!" === t2[o2]) { + o2 = h(t2, o2); + continue; + } + { + let d2 = false; + "/" === t2[o2] && (d2 = true, o2++); + let p2 = ""; + for (; o2 < t2.length && ">" !== t2[o2] && " " !== t2[o2] && " " !== t2[o2] && "\n" !== t2[o2] && "\r" !== t2[o2]; o2++) p2 += t2[o2]; + if (p2 = p2.trim(), "/" === p2[p2.length - 1] && (p2 = p2.substring(0, p2.length - 1), o2--), !r(p2)) { + let e3; + return e3 = 0 === p2.trim().length ? "Invalid space after '<'." : "Tag '" + p2 + "' is an invalid name.", x("InvalidTag", e3, b(t2, o2)); + } + const c2 = f(t2, o2); + if (false === c2) return x("InvalidAttr", "Attributes for '" + p2 + "' have open quote.", b(t2, o2)); + let N2 = c2.value; + if (o2 = c2.index, "/" === N2[N2.length - 1]) { + const i3 = o2 - N2.length; + N2 = N2.substring(0, N2.length - 1); + const s3 = g(N2, e2); + if (true !== s3) return x(s3.err.code, s3.err.msg, b(t2, i3 + s3.err.line)); + n2 = true; + } else if (d2) { + if (!c2.tagClosed) return x("InvalidTag", "Closing tag '" + p2 + "' doesn't have proper closing.", b(t2, o2)); + if (N2.trim().length > 0) return x("InvalidTag", "Closing tag '" + p2 + "' can't have attributes or invalid starting.", b(t2, a2)); + if (0 === i2.length) return x("InvalidTag", "Closing tag '" + p2 + "' has not been opened.", b(t2, a2)); + { + const e3 = i2.pop(); + if (p2 !== e3.tagName) { + let i3 = b(t2, e3.tagStartPos); + return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + i3.line + ", col " + i3.col + ") instead of closing tag '" + p2 + "'.", b(t2, a2)); + } + 0 == i2.length && (s2 = true); + } + } else { + const r2 = g(N2, e2); + if (true !== r2) return x(r2.err.code, r2.err.msg, b(t2, o2 - N2.length + r2.err.line)); + if (true === s2) return x("InvalidXml", "Multiple possible root nodes found.", b(t2, o2)); + -1 !== e2.unpairedTags.indexOf(p2) || i2.push({ tagName: p2, tagStartPos: a2 }), n2 = true; + } + for (o2++; o2 < t2.length; o2++) if ("<" === t2[o2]) { + if ("!" === t2[o2 + 1]) { + o2++, o2 = h(t2, o2); + continue; + } + if ("?" !== t2[o2 + 1]) break; + if (o2 = u(t2, ++o2), o2.err) return o2; + } else if ("&" === t2[o2]) { + const e3 = m(t2, o2); + if (-1 == e3) return x("InvalidChar", "char '&' is not expected.", b(t2, o2)); + o2 = e3; + } else if (true === s2 && !l(t2[o2])) return x("InvalidXml", "Extra text at the end", b(t2, o2)); + "<" === t2[o2] && o2--; + } + } + } + return n2 ? 1 == i2.length ? x("InvalidTag", "Unclosed tag '" + i2[0].tagName + "'.", b(t2, i2[0].tagStartPos)) : !(i2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(i2.map(((t3) => t3.tagName)), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1); + } + function l(t2) { + return " " === t2 || " " === t2 || "\n" === t2 || "\r" === t2; + } + function u(t2, e2) { + const i2 = e2; + for (; e2 < t2.length; e2++) if ("?" != t2[e2] && " " != t2[e2]) ; + else { + const n2 = t2.substr(i2, e2 - i2); + if (e2 > 5 && "xml" === n2) return x("InvalidXml", "XML declaration allowed only at the start of the document.", b(t2, e2)); + if ("?" == t2[e2] && ">" == t2[e2 + 1]) { + e2++; + break; + } + } + return e2; + } + function h(t2, e2) { + if (t2.length > e2 + 5 && "-" === t2[e2 + 1] && "-" === t2[e2 + 2]) { + for (e2 += 3; e2 < t2.length; e2++) if ("-" === t2[e2] && "-" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } else if (t2.length > e2 + 8 && "D" === t2[e2 + 1] && "O" === t2[e2 + 2] && "C" === t2[e2 + 3] && "T" === t2[e2 + 4] && "Y" === t2[e2 + 5] && "P" === t2[e2 + 6] && "E" === t2[e2 + 7]) { + let i2 = 1; + for (e2 += 8; e2 < t2.length; e2++) if ("<" === t2[e2]) i2++; + else if (">" === t2[e2] && (i2--, 0 === i2)) break; + } else if (t2.length > e2 + 9 && "[" === t2[e2 + 1] && "C" === t2[e2 + 2] && "D" === t2[e2 + 3] && "A" === t2[e2 + 4] && "T" === t2[e2 + 5] && "A" === t2[e2 + 6] && "[" === t2[e2 + 7]) { + for (e2 += 8; e2 < t2.length; e2++) if ("]" === t2[e2] && "]" === t2[e2 + 1] && ">" === t2[e2 + 2]) { + e2 += 2; + break; + } + } + return e2; + } + const d = '"', p = "'"; + function f(t2, e2) { + let i2 = "", n2 = "", s2 = false; + for (; e2 < t2.length; e2++) { + if (t2[e2] === d || t2[e2] === p) "" === n2 ? n2 = t2[e2] : n2 !== t2[e2] || (n2 = ""); + else if (">" === t2[e2] && "" === n2) { + s2 = true; + break; + } + i2 += t2[e2]; + } + return "" === n2 && { value: i2, index: e2, tagClosed: s2 }; + } + const c = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g"); + function g(t2, e2) { + const i2 = s(t2, c), n2 = {}; + for (let t3 = 0; t3 < i2.length; t3++) { + if (0 === i2[t3][1].length) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' has no space in starting.", E(i2[t3])); + if (void 0 !== i2[t3][3] && void 0 === i2[t3][4]) return x("InvalidAttr", "Attribute '" + i2[t3][2] + "' is without value.", E(i2[t3])); + if (void 0 === i2[t3][3] && !e2.allowBooleanAttributes) return x("InvalidAttr", "boolean attribute '" + i2[t3][2] + "' is not allowed.", E(i2[t3])); + const s2 = i2[t3][2]; + if (!N(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(i2[t3])); + if (n2.hasOwnProperty(s2)) return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(i2[t3])); + n2[s2] = 1; + } + return true; + } + function m(t2, e2) { + if (";" === t2[++e2]) return -1; + if ("#" === t2[e2]) return (function(t3, e3) { + let i3 = /\d/; + for ("x" === t3[e3] && (e3++, i3 = /[\da-fA-F]/); e3 < t3.length; e3++) { + if (";" === t3[e3]) return e3; + if (!t3[e3].match(i3)) break; + } + return -1; + })(t2, ++e2); + let i2 = 0; + for (; e2 < t2.length; e2++, i2++) if (!(t2[e2].match(/\w/) && i2 < 20)) { + if (";" === t2[e2]) break; + return -1; + } + return e2; + } + function x(t2, e2, i2) { + return { err: { code: t2, msg: e2, line: i2.line || i2, col: i2.col } }; + } + function N(t2) { + return r(t2); + } + function b(t2, e2) { + const i2 = t2.substring(0, e2).split(/\r?\n/); + return { line: i2.length, col: i2[i2.length - 1].length + 1 }; + } + function E(t2) { + return t2.startIndex + t2[1].length; + } + const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, i2) { + return t2; + }, captureMetaData: false }; + let T; + T = "function" != typeof Symbol ? "@@xmlMetadata" : /* @__PURE__ */ Symbol("XML Node Metadata"); + class y { + constructor(t2) { + this.tagname = t2, this.child = [], this[":@"] = {}; + } + add(t2, e2) { + "__proto__" === t2 && (t2 = "#__proto__"), this.child.push({ [t2]: e2 }); + } + addChild(t2, e2) { + "__proto__" === t2.tagname && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), void 0 !== e2 && (this.child[this.child.length - 1][T] = { startIndex: e2 }); + } + static getMetaDataSymbol() { + return T; + } + } + class w { + constructor(t2) { + this.suppressValidationErr = !t2; + } + readDocType(t2, e2) { + const i2 = {}; + if ("O" !== t2[e2 + 3] || "C" !== t2[e2 + 4] || "T" !== t2[e2 + 5] || "Y" !== t2[e2 + 6] || "P" !== t2[e2 + 7] || "E" !== t2[e2 + 8]) throw new Error("Invalid Tag instead of DOCTYPE"); + { + e2 += 9; + let n2 = 1, s2 = false, r2 = false, o2 = ""; + for (; e2 < t2.length; e2++) if ("<" !== t2[e2] || r2) if (">" === t2[e2]) { + if (r2 ? "-" === t2[e2 - 1] && "-" === t2[e2 - 2] && (r2 = false, n2--) : n2--, 0 === n2) break; + } else "[" === t2[e2] ? s2 = true : o2 += t2[e2]; + else { + if (s2 && P(t2, "!ENTITY", e2)) { + let n3, s3; + e2 += 7, [n3, s3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === s3.indexOf("&") && (i2[n3] = { regx: RegExp(`&${n3};`, "g"), val: s3 }); + } else if (s2 && P(t2, "!ELEMENT", e2)) { + e2 += 8; + const { index: i3 } = this.readElementExp(t2, e2 + 1); + e2 = i3; + } else if (s2 && P(t2, "!ATTLIST", e2)) e2 += 8; + else if (s2 && P(t2, "!NOTATION", e2)) { + e2 += 9; + const { index: i3 } = this.readNotationExp(t2, e2 + 1, this.suppressValidationErr); + e2 = i3; + } else { + if (!P(t2, "!--", e2)) throw new Error("Invalid DOCTYPE"); + r2 = true; + } + n2++, o2 = ""; + } + if (0 !== n2) throw new Error("Unclosed DOCTYPE"); + } + return { entities: i2, i: e2 }; + } + readEntityExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++; + if (O(i2), e2 = I(t2, e2), !this.suppressValidationErr) { + if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported"); + if ("%" === t2[e2]) throw new Error("Parameter entities are not supported"); + } + let n2 = ""; + return [e2, n2] = this.readIdentifierVal(t2, e2, "entity"), [i2, n2, --e2]; + } + readNotationExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + !this.suppressValidationErr && O(i2), e2 = I(t2, e2); + const n2 = t2.substring(e2, e2 + 6).toUpperCase(); + if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`); + e2 += n2.length, e2 = I(t2, e2); + let s2 = null, r2 = null; + if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = I(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier")); + else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation"); + return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 }; + } + readIdentifierVal(t2, e2, i2) { + let n2 = ""; + const s2 = t2[e2]; + if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`); + for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++; + if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`); + return [++e2, n2]; + } + readElementExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`); + let n2 = ""; + if ("E" === t2[e2 = I(t2, e2)] && P(t2, "MPTY", e2)) e2 += 4; + else if ("A" === t2[e2] && P(t2, "NY", e2)) e2 += 2; + else if ("(" === t2[e2]) { + for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++; + if (")" !== t2[e2]) throw new Error("Unterminated content model"); + } else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`); + return { elementName: i2, contentModel: n2.trim(), index: e2 }; + } + readAttlistExp(t2, e2) { + e2 = I(t2, e2); + let i2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++; + O(i2), e2 = I(t2, e2); + let n2 = ""; + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++; + if (!O(n2)) throw new Error(`Invalid attribute name: "${n2}"`); + e2 = I(t2, e2); + let s2 = ""; + if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) { + if (s2 = "NOTATION", "(" !== t2[e2 = I(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`); + e2++; + let i3 = []; + for (; e2 < t2.length && ")" !== t2[e2]; ) { + let n3 = ""; + for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++; + if (n3 = n3.trim(), !O(n3)) throw new Error(`Invalid notation name: "${n3}"`); + i3.push(n3), "|" === t2[e2] && (e2++, e2 = I(t2, e2)); + } + if (")" !== t2[e2]) throw new Error("Unterminated list of notations"); + e2++, s2 += " (" + i3.join("|") + ")"; + } else { + for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++; + const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"]; + if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`); + } + e2 = I(t2, e2); + let r2 = ""; + return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 }; + } + } + const I = (t2, e2) => { + for (; e2 < t2.length && /\s/.test(t2[e2]); ) e2++; + return e2; + }; + function P(t2, e2, i2) { + for (let n2 = 0; n2 < e2.length; n2++) if (e2[n2] !== t2[i2 + n2 + 1]) return false; + return true; + } + function O(t2) { + if (r(t2)) return t2; + throw new Error(`Invalid entity name ${t2}`); + } + const A = /^[-+]?0x[a-fA-F0-9]+$/, S = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true }; + const V = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/; + function $(t2) { + return "function" == typeof t2 ? t2 : Array.isArray(t2) ? (e2) => { + for (const i2 of t2) { + if ("string" == typeof i2 && e2 === i2) return true; + if (i2 instanceof RegExp && i2.test(e2)) return true; + } + } : () => false; + } + class D { + constructor(t2) { + if (this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /&#([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = j, this.parseXml = L, this.parseTextData = M, this.resolveNameSpace = F, this.buildAttributesMap = k, this.isItStopNode = Y, this.replaceEntitiesValue = B, this.readStopNodeData = W, this.saveTextToParentTag = R, this.addChild = U, this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) { + this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set(); + for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) { + const e2 = this.options.stopNodes[t3]; + "string" == typeof e2 && (e2.startsWith("*.") ? this.stopNodesWildcard.add(e2.substring(2)) : this.stopNodesExact.add(e2)); + } + } + } + } + function j(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + this.lastEntities[n2] = { regex: new RegExp("&" + n2 + ";", "g"), val: t2[n2] }; + } + } + function M(t2, e2, i2, n2, s2, r2, o2) { + if (void 0 !== t2 && (this.options.trimValues && !n2 && (t2 = t2.trim()), t2.length > 0)) { + o2 || (t2 = this.replaceEntitiesValue(t2)); + const n3 = this.options.tagValueProcessor(e2, t2, i2, s2, r2); + return null == n3 ? t2 : typeof n3 != typeof t2 || n3 !== t2 ? n3 : this.options.trimValues || t2.trim() === t2 ? q(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2; + } + } + function F(t2) { + if (this.options.removeNSPrefix) { + const e2 = t2.split(":"), i2 = "/" === t2.charAt(0) ? "/" : ""; + if ("xmlns" === e2[0]) return ""; + 2 === e2.length && (t2 = i2 + e2[1]); + } + return t2; + } + const _ = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm"); + function k(t2, e2) { + if (true !== this.options.ignoreAttributes && "string" == typeof t2) { + const i2 = s(t2, _), n2 = i2.length, r2 = {}; + for (let t3 = 0; t3 < n2; t3++) { + const n3 = this.resolveNameSpace(i2[t3][1]); + if (this.ignoreAttributesFn(n3, e2)) continue; + let s2 = i2[t3][4], o2 = this.options.attributeNamePrefix + n3; + if (n3.length) if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), "__proto__" === o2 && (o2 = "#__proto__"), void 0 !== s2) { + this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2); + const t4 = this.options.attributeValueProcessor(n3, s2, e2); + r2[o2] = null == t4 ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : q(s2, this.options.parseAttributeValue, this.options.numberParseOptions); + } else this.options.allowBooleanAttributes && (r2[o2] = true); + } + if (!Object.keys(r2).length) return; + if (this.options.attributesGroupName) { + const t3 = {}; + return t3[this.options.attributesGroupName] = r2, t3; + } + return r2; + } + } + const L = function(t2) { + t2 = t2.replace(/\r\n?/g, "\n"); + const e2 = new y("!xml"); + let i2 = e2, n2 = "", s2 = ""; + const r2 = new w(this.options.processEntities); + for (let o2 = 0; o2 < t2.length; o2++) if ("<" === t2[o2]) if ("/" === t2[o2 + 1]) { + const e3 = G(t2, ">", o2, "Closing Tag is not closed."); + let r3 = t2.substring(o2 + 2, e3).trim(); + if (this.options.removeNSPrefix) { + const t3 = r3.indexOf(":"); + -1 !== t3 && (r3 = r3.substr(t3 + 1)); + } + this.options.transformTagName && (r3 = this.options.transformTagName(r3)), i2 && (n2 = this.saveTextToParentTag(n2, i2, s2)); + const a2 = s2.substring(s2.lastIndexOf(".") + 1); + if (r3 && -1 !== this.options.unpairedTags.indexOf(r3)) throw new Error(`Unpaired tag can not be used as closing tag: `); + let l2 = 0; + a2 && -1 !== this.options.unpairedTags.indexOf(a2) ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), i2 = this.tagsNodeStack.pop(), n2 = "", o2 = e3; + } else if ("?" === t2[o2 + 1]) { + let e3 = X(t2, o2, false, "?>"); + if (!e3) throw new Error("Pi Tag is not closed."); + if (n2 = this.saveTextToParentTag(n2, i2, s2), this.options.ignoreDeclaration && "?xml" === e3.tagName || this.options.ignorePiTags) ; + else { + const t3 = new y(e3.tagName); + t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2)), this.addChild(i2, t3, s2, o2); + } + o2 = e3.closeIndex + 1; + } else if ("!--" === t2.substr(o2 + 1, 3)) { + const e3 = G(t2, "-->", o2 + 4, "Comment is not closed."); + if (this.options.commentPropName) { + const r3 = t2.substring(o2 + 4, e3 - 2); + n2 = this.saveTextToParentTag(n2, i2, s2), i2.add(this.options.commentPropName, [{ [this.options.textNodeName]: r3 }]); + } + o2 = e3; + } else if ("!D" === t2.substr(o2 + 1, 2)) { + const e3 = r2.readDocType(t2, o2); + this.docTypeEntities = e3.entities, o2 = e3.i; + } else if ("![" === t2.substr(o2 + 1, 2)) { + const e3 = G(t2, "]]>", o2, "CDATA is not closed.") - 2, r3 = t2.substring(o2 + 9, e3); + n2 = this.saveTextToParentTag(n2, i2, s2); + let a2 = this.parseTextData(r3, i2.tagname, s2, true, false, true, true); + null == a2 && (a2 = ""), this.options.cdataPropName ? i2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: r3 }]) : i2.add(this.options.textNodeName, a2), o2 = e3 + 2; + } else { + let r3 = X(t2, o2, this.options.removeNSPrefix), a2 = r3.tagName; + const l2 = r3.rawTagName; + let u2 = r3.tagExp, h2 = r3.attrExpPresent, d2 = r3.closeIndex; + if (this.options.transformTagName) { + const t3 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t3), a2 = t3; + } + i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, s2, false)); + const p2 = i2; + p2 && -1 !== this.options.unpairedTags.indexOf(p2.tagname) && (i2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2); + const f2 = o2; + if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, s2, a2)) { + let e3 = ""; + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) "/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), o2 = r3.closeIndex; + else if (-1 !== this.options.unpairedTags.indexOf(a2)) o2 = r3.closeIndex; + else { + const i3 = this.readStopNodeData(t2, l2, d2 + 1); + if (!i3) throw new Error(`Unexpected end of ${l2}`); + o2 = i3.i, e3 = i3.tagContent; + } + const n3 = new y(a2); + a2 !== u2 && h2 && (n3[":@"] = this.buildAttributesMap(u2, s2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), n3.add(this.options.textNodeName, e3), this.addChild(i2, n3, s2, f2); + } else { + if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) { + if ("/" === a2[a2.length - 1] ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName) { + const t4 = this.options.transformTagName(a2); + u2 === a2 && (u2 = t4), a2 = t4; + } + const t3 = new y(a2); + a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), s2 = s2.substr(0, s2.lastIndexOf(".")); + } else { + const t3 = new y(a2); + this.tagsNodeStack.push(i2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2)), this.addChild(i2, t3, s2, f2), i2 = t3; + } + n2 = "", o2 = d2; + } + } + else n2 += t2[o2]; + return e2.child; + }; + function U(t2, e2, i2, n2) { + this.options.captureMetaData || (n2 = void 0); + const s2 = this.options.updateTag(e2.tagname, i2, e2[":@"]); + false === s2 || ("string" == typeof s2 ? (e2.tagname = s2, t2.addChild(e2, n2)) : t2.addChild(e2, n2)); + } + const B = function(t2) { + if (this.options.processEntities) { + for (let e2 in this.docTypeEntities) { + const i2 = this.docTypeEntities[e2]; + t2 = t2.replace(i2.regx, i2.val); + } + for (let e2 in this.lastEntities) { + const i2 = this.lastEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + if (this.options.htmlEntities) for (let e2 in this.htmlEntities) { + const i2 = this.htmlEntities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val); + } + return t2; + }; + function R(t2, e2, i2, n2) { + return t2 && (void 0 === n2 && (n2 = 0 === e2.child.length), void 0 !== (t2 = this.parseTextData(t2, e2.tagname, i2, false, !!e2[":@"] && 0 !== Object.keys(e2[":@"]).length, n2)) && "" !== t2 && e2.add(this.options.textNodeName, t2), t2 = ""), t2; + } + function Y(t2, e2, i2, n2) { + return !(!e2 || !e2.has(n2)) || !(!t2 || !t2.has(i2)); + } + function G(t2, e2, i2, n2) { + const s2 = t2.indexOf(e2, i2); + if (-1 === s2) throw new Error(n2); + return s2 + e2.length - 1; + } + function X(t2, e2, i2, n2 = ">") { + const s2 = (function(t3, e3, i3 = ">") { + let n3, s3 = ""; + for (let r3 = e3; r3 < t3.length; r3++) { + let e4 = t3[r3]; + if (n3) e4 === n3 && (n3 = ""); + else if ('"' === e4 || "'" === e4) n3 = e4; + else if (e4 === i3[0]) { + if (!i3[1]) return { data: s3, index: r3 }; + if (t3[r3 + 1] === i3[1]) return { data: s3, index: r3 }; + } else " " === e4 && (e4 = " "); + s3 += e4; + } + })(t2, e2 + 1, n2); + if (!s2) return; + let r2 = s2.data; + const o2 = s2.index, a2 = r2.search(/\s/); + let l2 = r2, u2 = true; + -1 !== a2 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart()); + const h2 = l2; + if (i2) { + const t3 = l2.indexOf(":"); + -1 !== t3 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1)); + } + return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 }; + } + function W(t2, e2, i2) { + const n2 = i2; + let s2 = 1; + for (; i2 < t2.length; i2++) if ("<" === t2[i2]) if ("/" === t2[i2 + 1]) { + const r2 = G(t2, ">", i2, `${e2} is not closed`); + if (t2.substring(i2 + 2, r2).trim() === e2 && (s2--, 0 === s2)) return { tagContent: t2.substring(n2, i2), i: r2 }; + i2 = r2; + } else if ("?" === t2[i2 + 1]) i2 = G(t2, "?>", i2 + 1, "StopNode is not closed."); + else if ("!--" === t2.substr(i2 + 1, 3)) i2 = G(t2, "-->", i2 + 3, "StopNode is not closed."); + else if ("![" === t2.substr(i2 + 1, 2)) i2 = G(t2, "]]>", i2, "StopNode is not closed.") - 2; + else { + const n3 = X(t2, i2, ">"); + n3 && ((n3 && n3.tagName) === e2 && "/" !== n3.tagExp[n3.tagExp.length - 1] && s2++, i2 = n3.closeIndex); + } + } + function q(t2, e2, i2) { + if (e2 && "string" == typeof t2) { + const e3 = t2.trim(); + return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) { + if (e4 = Object.assign({}, C, e4), !t3 || "string" != typeof t3) return t3; + let i3 = t3.trim(); + if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3; + if ("0" === t3) return 0; + if (e4.hex && A.test(i3)) return (function(t4) { + if (parseInt) return parseInt(t4, 16); + if (Number.parseInt) return Number.parseInt(t4, 16); + if (window && window.parseInt) return window.parseInt(t4, 16); + throw new Error("parseInt, Number.parseInt, window.parseInt are not supported"); + })(i3); + if (-1 !== i3.search(/.+[eE].+/)) return (function(t4, e5, i4) { + if (!i4.eNotation) return t4; + const n3 = e5.match(V); + if (n3) { + let s2 = n3[1] || ""; + const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2; + return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5); + } + return t4; + })(t3, i3, e4); + { + const s2 = S.exec(i3); + if (s2) { + const r2 = s2[1] || "", o2 = s2[2]; + let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2; + const l2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length]; + if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !l2)) return t3; + { + const n3 = Number(i3), s3 = String(n3); + if (0 === n3 || -0 === n3) return n3; + if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3; + if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3; + let l3 = o2 ? a2 : i3; + return o2 ? l3 === s3 || r2 + l3 === s3 ? n3 : t3 : l3 === s3 || l3 === r2 + s3 ? n3 : t3; + } + } + return t3; + } + var n2; + })(t2, i2); + } + return void 0 !== t2 ? t2 : ""; + } + const Z = y.getMetaDataSymbol(); + function K(t2, e2) { + return Q(t2, e2); + } + function Q(t2, e2, i2) { + let n2; + const s2 = {}; + for (let r2 = 0; r2 < t2.length; r2++) { + const o2 = t2[r2], a2 = z(o2); + let l2 = ""; + if (l2 = void 0 === i2 ? a2 : i2 + "." + a2, a2 === e2.textNodeName) void 0 === n2 ? n2 = o2[a2] : n2 += "" + o2[a2]; + else { + if (void 0 === a2) continue; + if (o2[a2]) { + let t3 = Q(o2[a2], e2, l2); + const i3 = H(t3, e2); + void 0 !== o2[Z] && (t3[Z] = o2[Z]), o2[":@"] ? J(t3, o2[":@"], l2, e2) : 1 !== Object.keys(t3).length || void 0 === t3[e2.textNodeName] || e2.alwaysCreateTextNode ? 0 === Object.keys(t3).length && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], void 0 !== s2[a2] && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, i3) ? s2[a2] = [t3] : s2[a2] = t3; + } + } + } + return "string" == typeof n2 ? n2.length > 0 && (s2[e2.textNodeName] = n2) : void 0 !== n2 && (s2[e2.textNodeName] = n2), s2; + } + function z(t2) { + const e2 = Object.keys(t2); + for (let t3 = 0; t3 < e2.length; t3++) { + const i2 = e2[t3]; + if (":@" !== i2) return i2; + } + } + function J(t2, e2, i2, n2) { + if (e2) { + const s2 = Object.keys(e2), r2 = s2.length; + for (let o2 = 0; o2 < r2; o2++) { + const r3 = s2[o2]; + n2.isArray(r3, i2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3]; + } + } + } + function H(t2, e2) { + const { textNodeName: i2 } = e2, n2 = Object.keys(t2).length; + return 0 === n2 || !(1 !== n2 || !t2[i2] && "boolean" != typeof t2[i2] && 0 !== t2[i2]); + } + class tt { + constructor(t2) { + this.externalEntities = {}, this.options = (function(t3) { + return Object.assign({}, v, t3); + })(t2); + } + parse(t2, e2) { + if ("string" != typeof t2 && t2.toString) t2 = t2.toString(); + else if ("string" != typeof t2) throw new Error("XML data is accepted in String or Bytes[] form."); + if (e2) { + true === e2 && (e2 = {}); + const i3 = a(t2, e2); + if (true !== i3) throw Error(`${i3.err.msg}:${i3.err.line}:${i3.err.col}`); + } + const i2 = new D(this.options); + i2.addExternalEntities(this.externalEntities); + const n2 = i2.parseXml(t2); + return this.options.preserveOrder || void 0 === n2 ? n2 : K(n2, this.options); + } + addEntity(t2, e2) { + if (-1 !== e2.indexOf("&")) throw new Error("Entity value can't have '&'"); + if (-1 !== t2.indexOf("&") || -1 !== t2.indexOf(";")) throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '"); + if ("&" === e2) throw new Error("An entity with value '&' is not permitted"); + this.externalEntities[t2] = e2; + } + static getMetaDataSymbol() { + return y.getMetaDataSymbol(); + } + } + function et(t2, e2) { + let i2 = ""; + return e2.format && e2.indentBy.length > 0 && (i2 = "\n"), it(t2, e2, "", i2); + } + function it(t2, e2, i2, n2) { + let s2 = "", r2 = false; + for (let o2 = 0; o2 < t2.length; o2++) { + const a2 = t2[o2], l2 = nt(a2); + if (void 0 === l2) continue; + let u2 = ""; + if (u2 = 0 === i2.length ? l2 : `${i2}.${l2}`, l2 === e2.textNodeName) { + let t3 = a2[l2]; + rt(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ot(t3, e2)), r2 && (s2 += n2), s2 += t3, r2 = false; + continue; + } + if (l2 === e2.cdataPropName) { + r2 && (s2 += n2), s2 += ``, r2 = false; + continue; + } + if (l2 === e2.commentPropName) { + s2 += n2 + ``, r2 = true; + continue; + } + if ("?" === l2[0]) { + const t3 = st(a2[":@"], e2), i3 = "?xml" === l2 ? "" : n2; + let o3 = a2[l2][0][e2.textNodeName]; + o3 = 0 !== o3.length ? " " + o3 : "", s2 += i3 + `<${l2}${o3}${t3}?>`, r2 = true; + continue; + } + let h2 = n2; + "" !== h2 && (h2 += e2.indentBy); + const d2 = n2 + `<${l2}${st(a2[":@"], e2)}`, p2 = it(a2[l2], e2, u2, h2); + -1 !== e2.unpairedTags.indexOf(l2) ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : p2 && 0 !== p2.length || !e2.suppressEmptyNode ? p2 && p2.endsWith(">") ? s2 += d2 + `>${p2}${n2}` : (s2 += d2 + ">", p2 && "" !== n2 && (p2.includes("/>") || p2.includes("`) : s2 += d2 + "/>", r2 = true; + } + return s2; + } + function nt(t2) { + const e2 = Object.keys(t2); + for (let i2 = 0; i2 < e2.length; i2++) { + const n2 = e2[i2]; + if (t2.hasOwnProperty(n2) && ":@" !== n2) return n2; + } + } + function st(t2, e2) { + let i2 = ""; + if (t2 && !e2.ignoreAttributes) for (let n2 in t2) { + if (!t2.hasOwnProperty(n2)) continue; + let s2 = e2.attributeValueProcessor(n2, t2[n2]); + s2 = ot(s2, e2), true === s2 && e2.suppressBooleanAttributes ? i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}` : i2 += ` ${n2.substr(e2.attributeNamePrefix.length)}="${s2}"`; + } + return i2; + } + function rt(t2, e2) { + let i2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1); + for (let n2 in e2.stopNodes) if (e2.stopNodes[n2] === t2 || e2.stopNodes[n2] === "*." + i2) return true; + return false; + } + function ot(t2, e2) { + if (t2 && t2.length > 0 && e2.processEntities) for (let i2 = 0; i2 < e2.entities.length; i2++) { + const n2 = e2.entities[i2]; + t2 = t2.replace(n2.regex, n2.val); + } + return t2; + } + const at = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) { + return e2; + }, attributeValueProcessor: function(t2, e2) { + return e2; + }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false }; + function lt(t2) { + this.options = Object.assign({}, at, t2), true === this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() { + return false; + } : (this.ignoreAttributesFn = $(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = dt), this.processTextOrObjNode = ut, this.options.format ? (this.indentate = ht, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() { + return ""; + }, this.tagEndChar = ">", this.newLine = ""); + } + function ut(t2, e2, i2, n2) { + const s2 = this.j2x(t2, i2 + 1, n2.concat(e2)); + return void 0 !== t2[this.options.textNodeName] && 1 === Object.keys(t2).length ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, i2) : this.buildObjectNode(s2.val, e2, s2.attrStr, i2); + } + function ht(t2) { + return this.options.indentBy.repeat(t2); + } + function dt(t2) { + return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen); + } + lt.prototype.build = function(t2) { + return this.options.preserveOrder ? et(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val); + }, lt.prototype.j2x = function(t2, e2, i2) { + let n2 = "", s2 = ""; + const r2 = i2.join("."); + for (let o2 in t2) if (Object.prototype.hasOwnProperty.call(t2, o2)) if (void 0 === t2[o2]) this.isAttribute(o2) && (s2 += ""); + else if (null === t2[o2]) this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if (t2[o2] instanceof Date) s2 += this.buildTextValNode(t2[o2], o2, "", e2); + else if ("object" != typeof t2[o2]) { + const i3 = this.isAttribute(o2); + if (i3 && !this.ignoreAttributesFn(i3, r2)) n2 += this.buildAttrPairStr(i3, "" + t2[o2]); + else if (!i3) if (o2 === this.options.textNodeName) { + let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]); + s2 += this.replaceEntitiesValue(e3); + } else s2 += this.buildTextValNode(t2[o2], o2, "", e2); + } else if (Array.isArray(t2[o2])) { + const n3 = t2[o2].length; + let r3 = "", a2 = ""; + for (let l2 = 0; l2 < n3; l2++) { + const n4 = t2[o2][l2]; + if (void 0 === n4) ; + else if (null === n4) "?" === o2[0] ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar; + else if ("object" == typeof n4) if (this.options.oneListGroup) { + const t3 = this.j2x(n4, e2 + 1, i2.concat(o2)); + r3 += t3.val, this.options.attributesGroupName && n4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr); + } else r3 += this.processTextOrObjNode(n4, o2, e2, i2); + else if (this.options.oneListGroup) { + let t3 = this.options.tagValueProcessor(o2, n4); + t3 = this.replaceEntitiesValue(t3), r3 += t3; + } else r3 += this.buildTextValNode(n4, o2, "", e2); + } + this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3; + } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) { + const e3 = Object.keys(t2[o2]), i3 = e3.length; + for (let s3 = 0; s3 < i3; s3++) n2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]); + } else s2 += this.processTextOrObjNode(t2[o2], o2, e2, i2); + return { attrStr: n2, val: s2 }; + }, lt.prototype.buildAttrPairStr = function(t2, e2) { + return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && "true" === e2 ? " " + t2 : " " + t2 + '="' + e2 + '"'; + }, lt.prototype.buildObjectNode = function(t2, e2, i2, n2) { + if ("" === t2) return "?" === e2[0] ? this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar; + { + let s2 = "` + this.newLine : this.indentate(n2) + "<" + e2 + i2 + r2 + this.tagEndChar + t2 + this.indentate(n2) + s2 : this.indentate(n2) + "<" + e2 + i2 + r2 + ">" + t2 + s2; + } + }, lt.prototype.closeTag = function(t2) { + let e2 = ""; + return -1 !== this.options.unpairedTags.indexOf(t2) ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>` + this.newLine; + if (false !== this.options.commentPropName && e2 === this.options.commentPropName) return this.indentate(n2) + `` + this.newLine; + if ("?" === e2[0]) return this.indentate(n2) + "<" + e2 + i2 + "?" + this.tagEndChar; + { + let s2 = this.options.tagValueProcessor(e2, t2); + return s2 = this.replaceEntitiesValue(s2), "" === s2 ? this.indentate(n2) + "<" + e2 + i2 + this.closeTag(e2) + this.tagEndChar : this.indentate(n2) + "<" + e2 + i2 + ">" + s2 + " 0 && this.options.processEntities) for (let e2 = 0; e2 < this.options.entities.length; e2++) { + const i2 = this.options.entities[e2]; + t2 = t2.replace(i2.regex, i2.val); + } + return t2; + }; + const pt = { validate: a }; + module2.exports = e; + })(); } }); @@ -44089,7 +45675,7 @@ var require_xml = __commonJS({ return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); } function stringifyXML(obj, opts = {}) { const parserOptions = getSerializerOptions(opts); @@ -44123,7 +45709,7 @@ var require_xml = __commonJS({ }); // node_modules/@azure/core-xml/dist/commonjs/index.js -var require_commonjs9 = __commonJS({ +var require_commonjs10 = __commonJS({ "node_modules/@azure/core-xml/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -44145,6 +45731,17 @@ var require_commonjs9 = __commonJS({ } }); +// node_modules/@azure/storage-blob/dist/commonjs/log.js +var require_log5 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-blob"); + } +}); + // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js var require_AbortError3 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { @@ -44162,7 +45759,7 @@ var require_AbortError3 = __commonJS({ }); // node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js -var require_commonjs10 = __commonJS({ +var require_commonjs11 = __commonJS({ "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -44174,1193 +45771,15 @@ var require_commonjs10 = __commonJS({ } }); -// node_modules/@azure/abort-controller/dist/index.js -var require_dist5 = __commonJS({ - "node_modules/@azure/abort-controller/dist/index.js"(exports2) { +// node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/RequestPolicy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var listenersMap = /* @__PURE__ */ new WeakMap(); - var abortedMap = /* @__PURE__ */ new WeakMap(); - var AbortSignal2 = class _AbortSignal { - constructor() { - this.onabort = null; - listenersMap.set(this, []); - abortedMap.set(this, false); - } - /** - * Status of whether aborted or not. - * - * @readonly - */ - get aborted() { - if (!abortedMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - return abortedMap.get(this); - } - /** - * Creates a new AbortSignal instance that will never be aborted. - * - * @readonly - */ - static get none() { - return new _AbortSignal(); - } - /** - * Added new "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be added - */ - addEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - listeners.push(listener); - } - /** - * Remove "abort" event listener, only support "abort" event. - * - * @param _type - Only support "abort" event - * @param listener - The listener to be removed - */ - removeEventListener(_type, listener) { - if (!listenersMap.has(this)) { - throw new TypeError("Expected `this` to be an instance of AbortSignal."); - } - const listeners = listenersMap.get(this); - const index = listeners.indexOf(listener); - if (index > -1) { - listeners.splice(index, 1); - } - } - /** - * Dispatches a synthetic event to the AbortSignal. - */ - dispatchEvent(_event) { - throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); - } - }; - function abortSignal(signal) { - if (signal.aborted) { - return; - } - if (signal.onabort) { - signal.onabort.call(signal); - } - const listeners = listenersMap.get(signal); - if (listeners) { - listeners.slice().forEach((listener) => { - listener.call(signal, { type: "abort" }); - }); - } - abortedMap.set(signal, true); - } - var AbortError = class extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } - }; - var AbortController2 = class { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - constructor(parentSignals) { - this._signal = new AbortSignal2(); - if (!parentSignals) { - return; - } - if (!Array.isArray(parentSignals)) { - parentSignals = arguments; - } - for (const parentSignal of parentSignals) { - if (parentSignal.aborted) { - this.abort(); - } else { - parentSignal.addEventListener("abort", () => { - this.abort(); - }); - } - } - } - /** - * The AbortSignal associated with this controller that will signal aborted - * when the abort method is called on this controller. - * - * @readonly - */ - get signal() { - return this._signal; - } - /** - * Signal that any operations passed this controller's associated abort signal - * to cancel any remaining work and throw an `AbortError`. - */ - abort() { - abortSignal(this._signal); - } - /** - * Creates a new AbortSignal instance that will abort after the provided ms. - * @param ms - Elapsed time in milliseconds to trigger an abort. - */ - static timeout(ms) { - const signal = new AbortSignal2(); - const timer = setTimeout(abortSignal, ms, signal); - if (typeof timer.unref === "function") { - timer.unref(); - } - return signal; - } - }; - exports2.AbortController = AbortController2; - exports2.AbortError = AbortError; - exports2.AbortSignal = AbortSignal2; - } -}); - -// node_modules/@azure/core-lro/dist/index.js -var require_dist6 = __commonJS({ - "node_modules/@azure/core-lro/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var logger$1 = require_dist(); - var abortController = require_dist5(); - var coreUtil = require_commonjs2(); - var logger = logger$1.createClientLogger("core-lro"); - var POLL_INTERVAL_IN_MS = 2e3; - var terminalStates = ["succeeded", "canceled", "failed"]; - function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } - } - function setStateError(inputs) { - const { state, stateProxy, isOperationError: isOperationError2 } = inputs; - return (error3) => { - if (isOperationError2(error3)) { - stateProxy.setError(state, error3); - stateProxy.setFailed(state); - } - throw error3; - }; - } - function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; - } - function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message - }; - } - function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult - })); - } - } - function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; - } - async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus: getOperationStatus2, withOperationLocation, setErrorAsResult } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation - }; - logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus2({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; - } - async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, isOperationError: isOperationError2, options } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError: isOperationError2 - })); - const status = getOperationStatus2(response, state); - logger.verbose(`LRO: Status: - Polling from: ${state.config.operationLocation} - Operation status: ${status} - Polling status: ${terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation2(response, state); - if (resourceLocation !== void 0) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError: isOperationError2 })), - status - }; - } - } - return { response, status }; - } - async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus: getOperationStatus2, getResourceLocation: getResourceLocation2, getOperationLocation: getOperationLocation2, isOperationError: isOperationError2, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== void 0) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus: getOperationStatus2, - state, - stateProxy, - operationLocation, - getResourceLocation: getResourceLocation2, - isOperationError: isOperationError2, - options - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult - }); - if (!terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation2 === null || getOperationLocation2 === void 0 ? void 0 : getOperationLocation2(response, state); - if (location !== void 0) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); - } - } - function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; - } - function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; - } - function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; - } - function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; - } - function findResourceLocation(inputs) { - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return void 0; - } - default: { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return void 0; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } - } - } - function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== void 0) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig - }) - }; - } else if (location !== void 0) { - return { - mode: "ResourceLocation", - operationLocation: location - }; - } else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath - }; - } else { - return void 0; - } - } - function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== void 0) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case void 0: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } - } - function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); - } - function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } else if (statusCode < 300) { - return "succeeded"; - } else { - return "failed"; - } - } - function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== void 0) { - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; - } - return void 0; - } - function getErrorFromResponse(response) { - const error3 = response.flatResponse.error; - if (!error3) { - logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error3.code || !error3.message) { - logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error3; - } - function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return void 0; - } - function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case void 0: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === void 0 ? "succeeded" : status; - } - async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return initOperation({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - stateProxy, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult - }); - } - function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) - }); - } - case "ResourceLocation": { - return getLocationHeader(rawResponse); - } - case "Body": - default: { - return void 0; - } - } - } - function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); - } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } - } - function getResourceLocation({ flatResponse }, state) { - if (typeof flatResponse === "object") { - const resourceLocation = flatResponse.resourceLocation; - if (resourceLocation !== void 0) { - state.config.resourceLocation = resourceLocation; - } - } - return state.config.resourceLocation; - } - function isOperationError(e) { - return e.name === "RestError"; - } - async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; - return pollOperation({ - state, - stateProxy, - setDelay, - processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult - }); - } - var createStateProxy$1 = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => state.status = "canceled", - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.status = "running", - setSucceeded: (state) => state.status = "succeeded", - setFailed: (state) => state.status = "failed", - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded" - }); - function buildCreatePoller(inputs) { - const { getOperationLocation: getOperationLocation2, getStatusFromInitialResponse: getStatusFromInitialResponse2, getStatusFromPollResponse, isOperationError: isOperationError2, getResourceLocation: getResourceLocation2, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; - const stateProxy = createStateProxy$1(); - const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() : void 0; - const state = restoreFrom ? deserializeState(restoreFrom) : await initOperation({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse2, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful - }); - let resultPromise; - const abortController$1 = new abortController.AbortController(); - const handlers = /* @__PURE__ */ new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === void 0, - stopPolling: () => { - abortController$1.abort(); - }, - toString: () => JSON.stringify({ - state - }), - onProgress: (callback) => { - const s = /* @__PURE__ */ Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal ? new abortController.AbortController([inputAbortSignal, abortController$1.signal]) : abortController$1; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await coreUtil.delay(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = void 0; - }), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await pollOperation({ - poll, - state, - stateProxy, - getOperationLocation: getOperationLocation2, - isOperationError: isOperationError2, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation: getResourceLocation2, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - } - }; - return poller; - }; - } - async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; - return buildCreatePoller({ - getStatusFromInitialResponse, - getStatusFromPollResponse: getOperationStatus, - isOperationError, - getOperationLocation, - getResourceLocation, - getPollingInterval: parseRetryAfter, - getError: getErrorFromResponse, - resolveOnUnsuccessful - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); - }, - poll: lro.sendPollRequest - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse - }); - } - var createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => state.isCancelled = true, - setError: (state, error3) => state.error = error3, - setResult: (state, result) => state.result = result, - setRunning: (state) => state.isStarted = true, - setSucceeded: (state) => state.isCompleted = true, - setFailed: () => { - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) - }); - var GenericPollOperation = class { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; - } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; - } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), await initHttpOperation({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult - })); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === void 0) { - await pollHttpOperation({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, - isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; - } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state - }); - } - }; - var PollerStoppedError = class _PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, _PollerStoppedError.prototype); - } - }; - var PollerCancelledError = class _PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, _PollerCancelledError.prototype); - } - }; - var Poller = class { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve6, reject) => { - this.resolve = resolve6; - this.reject = reject; - }); - this.promise.catch(() => { - }); - } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } - } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this) - }); - } - this.processUpdatedState(); - } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); - } - } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = void 0; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error3 = new PollerCancelledError("Operation was canceled"); - this.reject(error3); - throw error3; - } - } - if (this.isDone() && this.resolve) { - this.resolve(this.getResult()); - } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; - } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); - } - }; - var LroEngine = class extends Poller { - constructor(lro, options) { - const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; - const state = resumeFrom ? deserializeState(resumeFrom) : {}; - const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs }; - operation.setPollerConfig(this.config); - } - /** - * The method used by the poller to wait before attempting to update its operation. - */ - delay() { - return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); - } - }; - exports2.LroEngine = LroEngine; - exports2.Poller = Poller; - exports2.PollerCancelledError = PollerCancelledError; - exports2.PollerStoppedError = PollerStoppedError; - exports2.createHttpPoller = createHttpPoller; - } -}); - -// node_modules/@azure/storage-blob/dist/index.js -var require_dist7 = __commonJS({ - "node_modules/@azure/storage-blob/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var coreRestPipeline = require_commonjs5(); - var tslib = (init_tslib_es62(), __toCommonJS(tslib_es6_exports2)); - var coreAuth = require_commonjs6(); - var coreUtil = require_commonjs2(); - var coreHttpCompat = require_commonjs8(); - var coreClient = require_commonjs7(); - var coreXml = require_commonjs9(); - var logger$1 = require_dist(); - var abortController = require_commonjs10(); - var crypto = require("crypto"); - var coreTracing = require_commonjs4(); - var stream2 = require("stream"); - var coreLro = require_dist6(); - var events = require("events"); - var fs13 = require("fs"); - var util = require("util"); - var buffer = require("buffer"); - function _interopNamespaceDefault(e) { - var n = /* @__PURE__ */ Object.create(null); - if (e) { - Object.keys(e).forEach(function(k) { - if (k !== "default") { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function() { - return e[k]; - } - }); - } - }); - } - n.default = e; - return Object.freeze(n); - } - var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); - var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs13); - var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); - var logger = logger$1.createClientLogger("storage-blob"); + exports2.BaseRequestPolicy = void 0; var BaseRequestPolicy = class { + _nextPolicy; + _options; /** * The main method to implement that manipulates a request/response. */ @@ -45386,17 +45805,27 @@ var require_dist7 = __commonJS({ this._options.log(logLevel, message); } }; - var SDK_VERSION = "12.25.0"; - var SERVICE_VERSION = "2024-11-04"; - var BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; - var BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; - var BLOCK_BLOB_MAX_BLOCKS = 5e4; - var DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; - var DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; - var DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; - var REQUEST_TIMEOUT = 100 * 1e3; - var StorageOAuthScopes = "https://storage.azure.com/.default"; - var URLConstants = { + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js +var require_constants10 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.BlobDoesNotUseCustomerSpecifiedEncryption = exports2.BlobUsesCustomerSpecifiedEncryptionMsg = exports2.StorageBlobLoggingAllowedQueryParameters = exports2.StorageBlobLoggingAllowedHeaderNames = exports2.DevelopmentConnectionString = exports2.EncryptionAlgorithmAES25 = exports2.HTTP_VERSION_1_1 = exports2.HTTP_LINE_ENDING = exports2.BATCH_MAX_PAYLOAD_IN_BYTES = exports2.BATCH_MAX_REQUEST = exports2.SIZE_1_MB = exports2.ETagAny = exports2.ETagNone = exports2.HeaderConstants = exports2.HTTPURLConnection = exports2.URLConstants = exports2.StorageOAuthScopes = exports2.REQUEST_TIMEOUT = exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports2.BLOCK_BLOB_MAX_BLOCKS = exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports2.SERVICE_VERSION = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "12.29.1"; + exports2.SERVICE_VERSION = "2025-11-05"; + exports2.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4e3 * 1024 * 1024; + exports2.BLOCK_BLOB_MAX_BLOCKS = 5e4; + exports2.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; + exports2.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; + exports2.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; + exports2.REQUEST_TIMEOUT = 100 * 1e3; + exports2.StorageOAuthScopes = "https://storage.azure.com/.default"; + exports2.URLConstants = { Parameters: { FORCE_BROWSER_NO_CACHE: "_", SIGNATURE: "sig", @@ -45405,14 +45834,14 @@ var require_dist7 = __commonJS({ TIMEOUT: "timeout" } }; - var HTTPURLConnection = { + exports2.HTTPURLConnection = { HTTP_ACCEPTED: 202, HTTP_CONFLICT: 409, HTTP_NOT_FOUND: 404, HTTP_PRECON_FAILED: 412, HTTP_RANGE_NOT_SATISFIABLE: 416 }; - var HeaderConstants = { + exports2.HeaderConstants = { AUTHORIZATION: "Authorization", AUTHORIZATION_SCHEME: "Bearer", CONTENT_ENCODING: "Content-Encoding", @@ -45438,16 +45867,16 @@ var require_dist7 = __commonJS({ X_MS_VERSION: "x-ms-version", X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" }; - var ETagNone = ""; - var ETagAny = "*"; - var SIZE_1_MB = 1 * 1024 * 1024; - var BATCH_MAX_REQUEST = 256; - var BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; - var HTTP_LINE_ENDING = "\r\n"; - var HTTP_VERSION_1_1 = "HTTP/1.1"; - var EncryptionAlgorithmAES25 = "AES256"; - var DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; - var StorageBlobLoggingAllowedHeaderNames = [ + exports2.ETagNone = ""; + exports2.ETagAny = "*"; + exports2.SIZE_1_MB = 1 * 1024 * 1024; + exports2.BATCH_MAX_REQUEST = 256; + exports2.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports2.SIZE_1_MB; + exports2.HTTP_LINE_ENDING = "\r\n"; + exports2.HTTP_VERSION_1_1 = "HTTP/1.1"; + exports2.EncryptionAlgorithmAES25 = "AES256"; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.StorageBlobLoggingAllowedHeaderNames = [ "Access-Control-Allow-Origin", "Cache-Control", "Content-Length", @@ -45545,7 +45974,7 @@ var require_dist7 = __commonJS({ "x-ms-if-tags", "x-ms-source-if-tags" ]; - var StorageBlobLoggingAllowedQueryParameters = [ + exports2.StorageBlobLoggingAllowedQueryParameters = [ "comp", "maxresults", "rscc", @@ -45580,9 +46009,9 @@ var require_dist7 = __commonJS({ "skv", "snapshot" ]; - var BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; - var BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; - var PathStylePorts = [ + exports2.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; + exports2.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; + exports2.PathStylePorts = [ "10000", "10001", "10002", @@ -45604,8 +46033,55 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url3) { - const urlParsed = new URL(url3); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js +var require_utils_common = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.toBlobTagsString = toBlobTagsString; + exports2.toBlobTags = toBlobTags; + exports2.toTags = toTags; + exports2.toQuerySerialization = toQuerySerialization; + exports2.parseObjectReplicationRecord = parseObjectReplicationRecord; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.BlobNameToString = BlobNameToString; + exports2.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; + exports2.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; + exports2.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); let path12 = urlParsed.pathname; path12 = path12 || "/"; path12 = escape(path12); @@ -45637,7 +46113,7 @@ var require_dist7 = __commonJS({ let proxyUri = ""; if (connectionString.startsWith("UseDevelopmentStorage=true")) { proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; + connectionString = constants_js_1.DevelopmentConnectionString; } let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; @@ -45692,15 +46168,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(url3, name) { - const urlParsed = new URL(url3); + function appendToURLPath(url2, name) { + const urlParsed = new URL(url2); let path12 = urlParsed.pathname; path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; urlParsed.pathname = path12; return urlParsed.toString(); } - function setURLParameter(url3, name, value) { - const urlParsed = new URL(url3); + function setURLParameter(url2, name, value) { + const urlParsed = new URL(url2); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -45719,34 +46195,33 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url3, name) { - var _a; - const urlParsed = new URL(url3); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; } - function setURLHost(url3, host) { - const urlParsed = new URL(url3); + function setURLHost(url2, host) { + const urlParsed = new URL(url2); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url3) { + function getURLPath(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url3) { + function getURLScheme(url2) { try { - const urlParsed = new URL(url3); + const urlParsed = new URL(url2); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url3) { - const urlParsed = new URL(url3); + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -45758,8 +46233,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url3) { - let queryString = new URL(url3).search; + function getURLQueries(url2) { + let queryString = new URL(url2).search; if (!queryString) { return {}; } @@ -45780,8 +46255,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url3, queryParts) { - const urlParsed = new URL(url3); + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -45796,7 +46271,10 @@ var require_dist7 = __commonJS({ return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; } function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } function generateBlockID(blockIDPrefix, blockIndex) { const maxSourceStringLength = 48; @@ -45844,11 +46322,31 @@ var require_dist7 = __commonJS({ return padString.slice(0, targetLength) + currentString; } } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url3) { - const parsedUrl = new URL(url3); + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -45865,31 +46363,31 @@ var require_dist7 = __commonJS({ } function isIpEndpointStyle(parsedUrl) { const host = parsedUrl.host; - return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port); + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); } - function toBlobTagsString(tags2) { - if (tags2 === void 0) { + function toBlobTagsString(tags) { + if (tags === void 0) { return void 0; } const tagPairs = []; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } } return tagPairs.join("&"); } - function toBlobTags(tags2) { - if (tags2 === void 0) { + function toBlobTags(tags) { + if (tags === void 0) { return void 0; } const res = { blobTagSet: [] }; - for (const key in tags2) { - if (Object.prototype.hasOwnProperty.call(tags2, key)) { - const value = tags2[key]; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; res.blobTagSet.push({ key, value @@ -45898,12 +46396,12 @@ var require_dist7 = __commonJS({ } return res; } - function toTags(tags2) { - if (tags2 === void 0) { + function toTags(tags) { + if (tags === void 0) { return void 0; } const res = {}; - for (const blobTag of tags2.blobTagSet) { + for (const blobTag of tags.blobTagSet) { res[blobTag.key] = blobTag.value; } return res; @@ -45984,6 +46482,10 @@ var require_dist7 = __commonJS({ } return orProperties; } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } function httpAuthorizationToString(httpAuthorization) { return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; } @@ -45995,25 +46497,39 @@ var require_dist7 = __commonJS({ } } function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }) - } }); + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name) + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name) + }; + return blobItem; + }) + } + }; } function* ExtractPageRangeInfoItems(getPageRangesSegment) { let pageRange = []; @@ -46069,22 +46585,58 @@ var require_dist7 = __commonJS({ } throw new TypeError(`Unexpected response object ${response}`); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(exports2.StorageRetryPolicyType || (exports2.StorageRetryPolicyType = {})); - var DEFAULT_RETRY_OPTIONS$1 = { + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs11(); + var RequestPolicy_js_1 = require_RequestPolicy(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } + var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: exports2.StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy }; - var RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); - var StorageRetryPolicy = class extends BaseRequestPolicy { + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; /** * Creates an instance of RetryPolicy. * @@ -46092,15 +46644,15 @@ var require_dist7 = __commonJS({ * @param options - * @param retryOptions - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { super(nextPolicy, options); this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS$1.secondaryHost + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost }; } /** @@ -46125,21 +46677,21 @@ var require_dist7 = __commonJS({ const newRequest = request.clone(); const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); } let response; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await this._nextPolicy.sendRequest(newRequest); if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { return response; } secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { throw err; } @@ -46157,10 +46709,10 @@ var require_dist7 = __commonJS({ */ shouldRetry(isPrimaryRetry, attempt, response, err) { if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); return false; } - const retriableErrors2 = [ + const retriableErrors = [ "ETIMEDOUT", "ESOCKETTIMEDOUT", "ECONNREFUSED", @@ -46173,9 +46725,9 @@ var require_dist7 = __commonJS({ // For default xhr based http client provided in ms-rest-js ]; if (err) { - for (const retriableError of retriableErrors2) { + for (const retriableError of retriableErrors) { if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } @@ -46183,16 +46735,29 @@ var require_dist7 = __commonJS({ if (response || err) { const statusCode = response ? response.status : err ? err.statusCode : 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } return false; @@ -46208,21 +46773,40 @@ var require_dist7 = __commonJS({ let delayTimeInMs = 0; if (isPrimaryRetry) { switch (this.retryOptions.retryPolicyType) { - case exports2.StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); break; - case exports2.StorageRetryPolicyType.FIXED: + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = this.retryOptions.retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay2(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); var StorageRetryPolicyFactory = class { + retryOptions; /** * Creates an instance of StorageRetryPolicyFactory. * @param retryOptions - @@ -46237,10 +46821,21 @@ var require_dist7 = __commonJS({ * @param options - */ create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } }; - var CredentialPolicy = class extends BaseRequestPolicy { + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Sends out request. * @@ -46259,6 +46854,16 @@ var require_dist7 = __commonJS({ return request; } }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; var table_lv0 = new Uint32Array([ 0, 0, @@ -46682,7 +47287,24 @@ var require_dist7 = __commonJS({ } return false; } - var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** * Creates an instance of StorageSharedKeyCredentialPolicy. * @param nextPolicy - @@ -46699,31 +47321,31 @@ var require_dist7 = __commonJS({ * @param request - */ signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE) + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); return request; } /** * Retrieve header value according to shared key sign rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key * * @param request - * @param headerName - @@ -46733,7 +47355,7 @@ var require_dist7 = __commonJS({ if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -46753,10 +47375,10 @@ var require_dist7 = __commonJS({ */ getCanonicalizedHeadersString(request) { let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -46777,10 +47399,10 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${this.factory.accountName}${path12}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -46800,6 +47422,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js +var require_Credential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; var Credential = class { /** * Creates a RequestPolicy object. @@ -46811,7 +47443,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Method should be implemented in children classes."); } }; - var StorageSharedKeyCredential = class extends Credential { + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; /** * Creates an instance of StorageSharedKeyCredential. * @param accountName - @@ -46829,7 +47482,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** * Generates a hash signature for an HTTP request or for a SAS. @@ -46837,10 +47490,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } }; - var AnonymousCredentialPolicy = class extends CredentialPolicy { + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { /** * Creates an instance of AnonymousCredentialPolicy. * @param nextPolicy - @@ -46852,7 +47516,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; super(nextPolicy, options); } }; - var AnonymousCredential = class extends Credential { + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy(); + var Credential_js_1 = require_Credential(); + var AnonymousCredential = class extends Credential_js_1.Credential { /** * Creates an {@link AnonymousCredentialPolicy} object. * @@ -46860,44 +47536,2054 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js +var require_BuffersStream = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BuffersStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BuffersStream = void 0; + var node_stream_1 = require("node:stream"); + var BuffersStream = class extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; + } else { + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } + }; + exports2.BuffersStream = BuffersStream; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js +var require_PooledBuffer = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/PooledBuffer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PooledBuffer = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var BuffersStream_js_1 = require_BuffersStream(); + var node_buffer_1 = tslib_1.__importDefault(require("node:buffer")); + var maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; + var PooledBuffer = class { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } + }; + exports2.PooledBuffer = PooledBuffer; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js +var require_BufferScheduler = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/BufferScheduler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BufferScheduler = void 0; + var events_1 = require("events"); + var PooledBuffer_js_1 = require_PooledBuffer(); + var BufferScheduler = class { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); + } + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); + } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; + } + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve6, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; + } + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve6).catch(reject); + } else if (this.unresolvedLength >= this.bufferSize) { + return; + } else { + resolve6(); + } + } + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); + } else { + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } else { + return false; + } + } + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } + } + }; + exports2.BufferScheduler = BufferScheduler; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/cache.js +var require_cache2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/cache.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCachedDefaultHttpClient = getCachedDefaultHttpClient; + var core_rest_pipeline_1 = require_commonjs6(); var _defaultHttpClient; function getCachedDefaultHttpClient() { if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } return _defaultHttpClient; } - var storageBrowserPolicyName = "storageBrowserPolicy"; - function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - } - }; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js +var require_RequestPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/RequestPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = void 0; + var BaseRequestPolicy = class { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor(_nextPolicy, _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } + }; + exports2.BaseRequestPolicy = BaseRequestPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/constants.js +var require_constants11 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PathStylePorts = exports2.DevelopmentConnectionString = exports2.HeaderConstants = exports2.URLConstants = exports2.SDK_VERSION = void 0; + exports2.SDK_VERSION = "1.0.0"; + exports2.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout" + } + }; + exports2.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code" + }; + exports2.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; + exports2.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104" + ]; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js +var require_utils_common2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.escapeURLPath = escapeURLPath; + exports2.getValueInConnString = getValueInConnString; + exports2.extractConnectionStringParts = extractConnectionStringParts; + exports2.appendToURLPath = appendToURLPath; + exports2.setURLParameter = setURLParameter; + exports2.getURLParameter = getURLParameter; + exports2.setURLHost = setURLHost; + exports2.getURLPath = getURLPath; + exports2.getURLScheme = getURLScheme; + exports2.getURLPathAndQuery = getURLPathAndQuery; + exports2.getURLQueries = getURLQueries; + exports2.appendToURLQuery = appendToURLQuery; + exports2.truncatedISO8061Date = truncatedISO8061Date; + exports2.base64encode = base64encode; + exports2.base64decode = base64decode; + exports2.generateBlockID = generateBlockID; + exports2.delay = delay2; + exports2.padStart = padStart2; + exports2.sanitizeURL = sanitizeURL; + exports2.sanitizeHeaders = sanitizeHeaders; + exports2.iEqual = iEqual; + exports2.getAccountNameFromUrl = getAccountNameFromUrl; + exports2.isIpEndpointStyle = isIpEndpointStyle; + exports2.attachCredential = attachCredential; + exports2.httpAuthorizationToString = httpAuthorizationToString; + exports2.EscapePath = EscapePath; + exports2.assertResponse = assertResponse; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + function escapeURLPath(url2) { + const urlParsed = new URL(url2); + let path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; + return urlParsed.toString(); } - var storageRetryPolicyName = "storageRetryPolicy"; + function getProxyUriFromDevConnString(connectionString) { + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } + } + return proxyUri; + } + function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; + } + function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && connectionString.search("AccountKey=") !== -1) { + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri + }; + } else { + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; + } + } + 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); + 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); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : void 0; + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); + } + function getURLParameter(url2, name) { + const urlParsed = new URL(url2); + return urlParsed.searchParams.get(name) ?? void 0; + } + function setURLHost(url2, host) { + const urlParsed = new URL(url2); + urlParsed.hostname = host; + return urlParsed.toString(); + } + function getURLPath(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.pathname; + } catch (e) { + return void 0; + } + } + function getURLScheme(url2) { + try { + const urlParsed = new URL(url2); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } catch (e) { + return void 0; + } + } + function getURLPathAndQuery(url2) { + const urlParsed = new URL(url2); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; + } + return `${pathString}${queryString}`; + } + function getURLQueries(url2) { + let queryString = new URL(url2).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1; + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; + } + function appendToURLQuery(url2, queryParts) { + const urlParsed = new URL(url2); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); + } + function truncatedISO8061Date(date, withMilliseconds = true) { + const dateString = date.toISOString(); + return withMilliseconds ? dateString.substring(0, dateString.length - 1) + "0000Z" : dateString.substring(0, dateString.length - 5) + "Z"; + } + function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); + } + function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); + } + function generateBlockID(blockIDPrefix, blockIndex) { + const maxSourceStringLength = 48; + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + padStart2(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); + } + async function delay2(timeInMs, aborter, abortError) { + return new Promise((resolve6, reject) => { + let timeout; + const abortHandler = () => { + if (timeout !== void 0) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== void 0) { + aborter.removeEventListener("abort", abortHandler); + } + resolve6(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== void 0) { + aborter.addEventListener("abort", abortHandler); + } + }); + } + function padStart2(currentString, targetLength, padString = " ") { + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; + } + } + function sanitizeURL(url2) { + let safeURL = url2; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; + } + function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } else { + headers.set(name, value); + } + } + return headers; + } + function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + } + function getAccountNameFromUrl(url2) { + const parsedUrl = new URL(url2); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + accountName = parsedUrl.hostname.split(".")[0]; + } else if (isIpEndpointStyle(parsedUrl)) { + accountName = parsedUrl.pathname.split("/")[1]; + } else { + accountName = ""; + } + return accountName; + } catch (error3) { + throw new Error("Unable to extract accountName with provided information."); + } + } + function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + return /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port); + } + function attachCredential(thing, credential) { + thing.credential = credential; + return thing; + } + function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : void 0; + } + function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); + } + function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); + } + }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); + var StorageBrowserPolicyFactory = class { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } + }; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js +var require_CredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/CredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CredentialPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy2(); + var CredentialPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + return request; + } + }; + exports2.CredentialPolicy = CredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js +var require_AnonymousCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/AnonymousCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredentialPolicy = void 0; + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var AnonymousCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + }; + exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js +var require_Credential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/Credential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Credential = void 0; + var Credential = class { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } + }; + exports2.Credential = Credential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js +var require_AnonymousCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/AnonymousCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AnonymousCredential = void 0; + var AnonymousCredentialPolicy_js_1 = require_AnonymousCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var AnonymousCredential = class extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } + }; + exports2.AnonymousCredential = AnonymousCredential; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js +var require_SharedKeyComparator2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/utils/SharedKeyComparator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.compareHeader = compareHeader; + var table_lv0 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1820, + 0, + 1823, + 1825, + 1827, + 1829, + 0, + 0, + 0, + 1837, + 2051, + 0, + 0, + 1843, + 0, + 3331, + 3354, + 3356, + 3358, + 3360, + 3362, + 3364, + 3366, + 3368, + 3370, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 0, + 0, + 1859, + 1860, + 1864, + 3586, + 3593, + 3594, + 3610, + 3617, + 3619, + 3621, + 3628, + 3634, + 3637, + 3638, + 3656, + 3665, + 3696, + 3708, + 3710, + 3721, + 3722, + 3729, + 3737, + 3743, + 3746, + 3748, + 3750, + 3751, + 3753, + 0, + 1868, + 0, + 1872, + 0 + ]); + var table_lv2 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 18, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + var table_lv4 = new Uint32Array([ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32786, + 0, + 0, + 0, + 0, + 0, + 33298, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]); + function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; + } + function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 1; + if (weight1 === 1 && weight2 === 1) { + i = 0; + j = 0; + ++curr_level; + } else if (weight1 === weight2) { + ++i; + ++j; + } else if (weight1 === 0) { + ++i; + } else if (weight2 === 0) { + ++j; + } else { + return weight1 < weight2; + } + } + return false; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js +var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredentialPolicy = void 0; + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var CredentialPolicy_js_1 = require_CredentialPolicy2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + var StorageSharedKeyCredentialPolicy = class extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || request.body !== void 0) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + this.getCanonicalizedHeadersString(request) + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path12 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + }; + exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js +var require_StorageSharedKeyCredential2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/credentials/StorageSharedKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageSharedKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); + var StorageSharedKeyCredentialPolicy_js_1 = require_StorageSharedKeyCredentialPolicy2(); + var Credential_js_1 = require_Credential2(); + var StorageSharedKeyCredential = class extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + }; + exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js +var require_AbortError4 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/AbortError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + exports2.AbortError = AbortError; + } +}); + +// node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js +var require_commonjs12 = __commonJS({ + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbortError = void 0; + var AbortError_js_1 = require_AbortError4(); + Object.defineProperty(exports2, "AbortError", { enumerable: true, get: function() { + return AbortError_js_1.AbortError; + } }); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/log.js +var require_log6 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("storage-common"); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js +var require_StorageRetryPolicyType2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyType = void 0; var StorageRetryPolicyType; (function(StorageRetryPolicyType2) { StorageRetryPolicyType2[StorageRetryPolicyType2["EXPONENTIAL"] = 0] = "EXPONENTIAL"; StorageRetryPolicyType2[StorageRetryPolicyType2["FIXED"] = 1] = "FIXED"; - })(StorageRetryPolicyType || (StorageRetryPolicyType = {})); + })(StorageRetryPolicyType || (exports2.StorageRetryPolicyType = StorageRetryPolicyType = {})); + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js +var require_StorageRetryPolicy2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicy = void 0; + exports2.NewRetryPolicyFactory = NewRetryPolicyFactory; + var abort_controller_1 = require_commonjs12(); + var RequestPolicy_js_1 = require_RequestPolicy2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + } + }; + } var DEFAULT_RETRY_OPTIONS = { maxRetryDelayInMs: 120 * 1e3, maxTries: 4, retryDelayInMs: 4 * 1e3, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + var StorageRetryPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType ? retryOptions.retryPolicyType : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 ? Math.floor(retryOptions.maxTries) : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 ? retryOptions.tryTimeoutInMs : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 ? retryOptions.maxRetryDelayInMs : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost ? retryOptions.secondaryHost : DEFAULT_RETRY_OPTIONS.secondaryHost + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || !this.retryOptions.secondaryHost || !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1e3).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions.maxTries}, no further try.`); + return false; + } + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || err.message.toUpperCase().includes(retriableError) || err.code && err.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } + }; + exports2.StorageRetryPolicy = StorageRetryPolicy; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js +var require_StorageRetryPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/StorageRetryPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageRetryPolicyFactory = exports2.StorageRetryPolicy = exports2.StorageRetryPolicyType = void 0; + var StorageRetryPolicy_js_1 = require_StorageRetryPolicy2(); + Object.defineProperty(exports2, "StorageRetryPolicy", { enumerable: true, get: function() { + return StorageRetryPolicy_js_1.StorageRetryPolicy; + } }); + var StorageRetryPolicyType_js_1 = require_StorageRetryPolicyType2(); + Object.defineProperty(exports2, "StorageRetryPolicyType", { enumerable: true, get: function() { + return StorageRetryPolicyType_js_1.StorageRetryPolicyType; + } }); + var StorageRetryPolicyFactory = class { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } + }; + exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants11(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } + return { + name: exports2.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs12(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory2(); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var log_js_1 = require_log6(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, secondaryHost: "", tryTimeoutInMs: void 0 // Use server side default timeout strategy @@ -46913,71 +49599,82 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; "EPIPE", "REQUEST_SEND_ERROR" ]; - var RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { - var _a2, _b2; if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } if (error3) { for (const retriableError of retriableErrors) { if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if ((error3 === null || error3 === void 0 ? void 0 : error3.code) === "PARSE_ERROR" && (error3 === null || error3 === void 0 ? void 0 : error3.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } if (response || error3) { - const statusCode = (_b2 = (_a2 = response === null || response === void 0 ? void 0 : response.status) !== null && _a2 !== void 0 ? _a2 : error3 === null || error3 === void 0 ? void 0 : error3.statusCode) !== null && _b2 !== void 0 ? _b2 : 0; + const statusCode = response?.status ?? error3?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; } if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); return true; } } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } return false; } function calculateDelay(isPrimaryRetry, attempt) { let delayTimeInMs = 0; if (isPrimaryRetry) { switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); break; - case StorageRetryPolicyType.FIXED: + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: delayTimeInMs = retryDelayInMs; break; } } else { delayTimeInMs = Math.random() * 1e3; } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); return delayTimeInMs; } return { - name: storageRetryPolicyName, + name: exports2.storageRetryPolicyName, async sendRequest(request, next) { if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); } const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : void 0; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; let secondaryHas404 = false; let attempt = 1; let retryAgain = true; @@ -46989,61 +49686,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; response = void 0; error3 = void 0; try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; } catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); error3 = e; } else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); throw e; } } retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); if (retryAgain) { - await delay2(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } attempt++; } if (response) { return response; } - throw error3 !== null && error3 !== void 0 ? error3 : new coreRestPipeline.RestError("RetryPolicy failed without known error."); + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); } }; } - var storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants11(); + var utils_common_js_1 = require_utils_common2(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator2(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; function storageSharedKeyCredentialPolicy(options) { function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } const stringToSign = [ request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE) + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); } function getHeaderValueToSign(request, headerName) { const value = request.headers.get(headerName); if (!value) { return ""; } - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { return ""; } return value; @@ -47051,12 +49762,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; function getCanonicalizedHeadersString(request) { let headersArray = []; for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { headersArray.push({ name, value }); } } headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); }); headersArray = headersArray.filter((value, index, array) => { if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { @@ -47072,10 +49783,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; canonicalizedResourceString += `/${options.accountName}${path12}`; - const queries = getURLQueries(request.url); + const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { const queryKeys = []; @@ -47095,14 +49806,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedResourceString; } return { - name: storageSharedKeyCredentialPolicyName, + name: exports2.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { signRequest(request); return next(request); } }; } - var StorageBrowserPolicy = class extends BaseRequestPolicy { + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js +var require_StorageRequestFailureDetailsParserPolicy = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/policies/StorageRequestFailureDetailsParserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRequestFailureDetailsParserPolicyName = void 0; + exports2.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; + exports2.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; + function storageRequestFailureDetailsParserPolicy() { + return { + name: exports2.storageRequestFailureDetailsParserPolicyName, + async sendRequest(request, next) { + try { + const response = await next(request); + return response; + } catch (err) { + if (typeof err === "object" && err !== null && err.response && err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; + } + } + }; + } + } +}); + +// node_modules/@azure/storage-common/dist/commonjs/index.js +var require_commonjs13 = __commonJS({ + "node_modules/@azure/storage-common/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BaseRequestPolicy = exports2.getCachedDefaultHttpClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_BufferScheduler(), exports2); + var cache_js_1 = require_cache2(); + Object.defineProperty(exports2, "getCachedDefaultHttpClient", { enumerable: true, get: function() { + return cache_js_1.getCachedDefaultHttpClient; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory(), exports2); + tslib_1.__exportStar(require_AnonymousCredential2(), exports2); + tslib_1.__exportStar(require_Credential2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy2(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_CredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicy(), exports2); + tslib_1.__exportStar(require_StorageBrowserPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageCorrectContentLengthPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyType2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicy2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy2(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicyV2(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory2(), exports2); + tslib_1.__exportStar(require_StorageRequestFailureDetailsParserPolicy(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js +var require_StorageBrowserPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageBrowserPolicyName = void 0; + exports2.storageBrowserPolicy = storageBrowserPolicy; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + exports2.storageBrowserPolicyName = "storageBrowserPolicy"; + function storageBrowserPolicy() { + return { + name: exports2.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js +var require_StorageRetryPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageRetryPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageRetryPolicyName = void 0; + exports2.storageRetryPolicy = storageRetryPolicy; + var abort_controller_1 = require_commonjs11(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var log_js_1 = require_log5(); + exports2.storageRetryPolicyName = "storageRetryPolicy"; + var DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1e3, + maxTries: 4, + retryDelayInMs: 4 * 1e3, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: void 0 + // Use server side default timeout strategy + }; + var retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR" + ]; + var RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); + function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error3) { + for (const retriableError of retriableErrors) { + if (error3.name.toUpperCase().includes(retriableError) || error3.message.toUpperCase().includes(retriableError) || error3.code && error3.code.toString().toUpperCase() === retriableError) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error3?.code === "PARSE_ERROR" && error3?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + if (response || error3) { + const statusCode = response?.status ?? error3?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== void 0) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } else { + delayTimeInMs = Math.random() * 1e3; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } + return { + name: exports2.storageRetryPolicyName, + async sendRequest(request, next) { + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1e3))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : void 0; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error3; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request.method) || attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = void 0; + error3 = void 0; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || !isPrimaryRetry && response.status === 404; + } catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error3 = e; + } else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error3 }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; + } + throw error3 ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js +var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageSharedKeyCredentialPolicyV2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageSharedKeyCredentialPolicyName = void 0; + exports2.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; + var node_crypto_1 = require("node:crypto"); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var SharedKeyComparator_js_1 = require_SharedKeyComparator(); + exports2.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; + function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, (/* @__PURE__ */ new Date()).toUTCString()); + if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE) + ].join("\n") + "\n" + getCanonicalizedHeadersString(request) + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey).update(stringToSign, "utf8").digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + } + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name.toLowerCase().trimRight()}:${header.value.trimLeft()} +`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path12 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path12}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += ` +${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } + return { + name: exports2.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + } + }; + } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js +var require_StorageBrowserPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageBrowserPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicy = void 0; + var RequestPolicy_js_1 = require_RequestPolicy(); + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); + var StorageBrowserPolicy = class extends RequestPolicy_js_1.BaseRequestPolicy { /** * Creates an instance of StorageBrowserPolicy. * @param nextPolicy - @@ -47119,17 +50190,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param request - */ async sendRequest(request) { - if (coreUtil.isNode) { + if (core_util_1.isNodeLike) { return this._nextPolicy.sendRequest(request); } if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, (/* @__PURE__ */ new Date()).getTime().toString()); } - request.headers.remove(HeaderConstants.COOKIE); - request.headers.remove(HeaderConstants.CONTENT_LENGTH); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); return this._nextPolicy.sendRequest(request); } }; + exports2.StorageBrowserPolicy = StorageBrowserPolicy; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js +var require_StorageBrowserPolicyFactory2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageBrowserPolicyFactory.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBrowserPolicyFactory = exports2.StorageBrowserPolicy = void 0; + var StorageBrowserPolicy_js_1 = require_StorageBrowserPolicy2(); + Object.defineProperty(exports2, "StorageBrowserPolicy", { enumerable: true, get: function() { + return StorageBrowserPolicy_js_1.StorageBrowserPolicy; + } }); var StorageBrowserPolicyFactory = class { /** * Creates a StorageBrowserPolicyFactory object. @@ -47138,24 +50223,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } }; - var storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; + exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js +var require_StorageCorrectContentLengthPolicy2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/policies/StorageCorrectContentLengthPolicy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.storageCorrectContentLengthPolicyName = void 0; + exports2.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; + var constants_js_1 = require_constants10(); + exports2.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; function storageCorrectContentLengthPolicy() { function correctContentLength(request) { if (request.body && (typeof request.body === "string" || Buffer.isBuffer(request.body)) && request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } } return { - name: storageCorrectContentLengthPolicyName, + name: exports2.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { correctContentLength(request); return next(request); } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Pipeline = exports2.StorageOAuthScopes = void 0; + exports2.isPipelineLike = isPipelineLike; + exports2.newPipeline = newPipeline; + exports2.getCoreClientOptions = getCoreClientOptions; + exports2.getCredentialFromPipeline = getCredentialFromPipeline; + var core_http_compat_1 = require_commonjs9(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_client_1 = require_commonjs8(); + var core_xml_1 = require_commonjs10(); + var core_auth_1 = require_commonjs7(); + var log_js_1 = require_log5(); + var StorageRetryPolicyFactory_js_1 = require_StorageRetryPolicyFactory(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var constants_js_1 = require_constants10(); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return constants_js_1.StorageOAuthScopes; + } }); + var storage_common_1 = require_commonjs13(); + var StorageBrowserPolicyV2_js_1 = require_StorageBrowserPolicyV22(); + var StorageRetryPolicyV2_js_1 = require_StorageRetryPolicyV22(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); + var StorageBrowserPolicyFactory_js_1 = require_StorageBrowserPolicyFactory2(); + var StorageCorrectContentLengthPolicy_js_1 = require_StorageCorrectContentLengthPolicy2(); function isPipelineLike(pipeline) { if (!pipeline || typeof pipeline !== "object") { return false; @@ -47164,6 +50293,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return Array.isArray(castPipeline.factories) && typeof castPipeline.options === "object" && typeof castPipeline.toServiceClientOptions === "function"; } var Pipeline = class { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; /** * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. * @@ -47187,9 +50324,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.Pipeline = Pipeline; function newPipeline(credential, pipelineOptions = {}) { if (!credential) { - credential = new AnonymousCredential(); + credential = new AnonymousCredential_js_1.AnonymousCredential(); } const pipeline = new Pipeline([], pipelineOptions); pipeline._credential = credential; @@ -47212,7 +50350,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (novelFactories.length) { const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), afterRetry: hasInjector }; } @@ -47220,75 +50358,86 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return void 0; } function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); + const { httpClient: v1Client, ...restOptions } = pipeline.options; let httpClient = pipeline._coreHttpClient; if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); pipeline._coreHttpClient = httpClient; } let corePipeline = pipeline._corePipeline; if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info - }, userAgentOptions: { - userAgentPrefix - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info + }, + userAgentOptions: { + userAgentPrefix + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } + } + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#" + } } } - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#" - } - } - } })); + }); corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); const downlevelResults = processDownlevelPipeline(pipeline); if (downlevelResults) { corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : void 0); } const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } pipeline._corePipeline = corePipeline; } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline + }; } function getCredentialFromPipeline(pipeline) { if (pipeline._credential) { return pipeline._credential; } - let credential = new AnonymousCredential(); + let credential = new AnonymousCredential_js_1.AnonymousCredential(); for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { credential = factory.credential; } else if (isStorageSharedKeyCredential(factory)) { return factory; @@ -47297,28 +50446,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return credential; } function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { return true; } return factory.constructor.name === "StorageSharedKeyCredential"; } function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { return true; } return factory.constructor.name === "AnonymousCredential"; } function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + return (0, core_auth_1.isTokenCredential)(factory.credential); } function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { return true; } return factory.constructor.name === "StorageBrowserPolicyFactory"; } function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { return true; } return factory.constructor.name === "StorageRetryPolicyFactory"; @@ -47361,7 +50510,160 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return policyName.startsWith(knownPolicyName); }); } - var BlobServiceProperties = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js +var require_models = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownStorageErrorCode = exports2.KnownBlobExpiryOptions = exports2.KnownFileShareTokenIntent = exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + var KnownFileShareTokenIntent; + (function(KnownFileShareTokenIntent2) { + KnownFileShareTokenIntent2["Backup"] = "backup"; + })(KnownFileShareTokenIntent || (exports2.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); + var KnownBlobExpiryOptions; + (function(KnownBlobExpiryOptions2) { + KnownBlobExpiryOptions2["NeverExpire"] = "NeverExpire"; + KnownBlobExpiryOptions2["RelativeToCreation"] = "RelativeToCreation"; + KnownBlobExpiryOptions2["RelativeToNow"] = "RelativeToNow"; + KnownBlobExpiryOptions2["Absolute"] = "Absolute"; + })(KnownBlobExpiryOptions || (exports2.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); + var KnownStorageErrorCode; + (function(KnownStorageErrorCode2) { + KnownStorageErrorCode2["AccountAlreadyExists"] = "AccountAlreadyExists"; + KnownStorageErrorCode2["AccountBeingCreated"] = "AccountBeingCreated"; + KnownStorageErrorCode2["AccountIsDisabled"] = "AccountIsDisabled"; + KnownStorageErrorCode2["AuthenticationFailed"] = "AuthenticationFailed"; + KnownStorageErrorCode2["AuthorizationFailure"] = "AuthorizationFailure"; + KnownStorageErrorCode2["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + KnownStorageErrorCode2["ConditionNotMet"] = "ConditionNotMet"; + KnownStorageErrorCode2["EmptyMetadataKey"] = "EmptyMetadataKey"; + KnownStorageErrorCode2["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + KnownStorageErrorCode2["InternalError"] = "InternalError"; + KnownStorageErrorCode2["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + KnownStorageErrorCode2["InvalidHeaderValue"] = "InvalidHeaderValue"; + KnownStorageErrorCode2["InvalidHttpVerb"] = "InvalidHttpVerb"; + KnownStorageErrorCode2["InvalidInput"] = "InvalidInput"; + KnownStorageErrorCode2["InvalidMd5"] = "InvalidMd5"; + KnownStorageErrorCode2["InvalidMetadata"] = "InvalidMetadata"; + KnownStorageErrorCode2["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + KnownStorageErrorCode2["InvalidRange"] = "InvalidRange"; + KnownStorageErrorCode2["InvalidResourceName"] = "InvalidResourceName"; + KnownStorageErrorCode2["InvalidUri"] = "InvalidUri"; + KnownStorageErrorCode2["InvalidXmlDocument"] = "InvalidXmlDocument"; + KnownStorageErrorCode2["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + KnownStorageErrorCode2["Md5Mismatch"] = "Md5Mismatch"; + KnownStorageErrorCode2["MetadataTooLarge"] = "MetadataTooLarge"; + KnownStorageErrorCode2["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + KnownStorageErrorCode2["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + KnownStorageErrorCode2["MissingRequiredHeader"] = "MissingRequiredHeader"; + KnownStorageErrorCode2["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + KnownStorageErrorCode2["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + KnownStorageErrorCode2["OperationTimedOut"] = "OperationTimedOut"; + KnownStorageErrorCode2["OutOfRangeInput"] = "OutOfRangeInput"; + KnownStorageErrorCode2["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + KnownStorageErrorCode2["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + KnownStorageErrorCode2["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + KnownStorageErrorCode2["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + KnownStorageErrorCode2["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + KnownStorageErrorCode2["ResourceNotFound"] = "ResourceNotFound"; + KnownStorageErrorCode2["ServerBusy"] = "ServerBusy"; + KnownStorageErrorCode2["UnsupportedHeader"] = "UnsupportedHeader"; + KnownStorageErrorCode2["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + KnownStorageErrorCode2["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + KnownStorageErrorCode2["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + KnownStorageErrorCode2["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + KnownStorageErrorCode2["BlobAlreadyExists"] = "BlobAlreadyExists"; + KnownStorageErrorCode2["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + KnownStorageErrorCode2["BlobNotFound"] = "BlobNotFound"; + KnownStorageErrorCode2["BlobOverwritten"] = "BlobOverwritten"; + KnownStorageErrorCode2["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + KnownStorageErrorCode2["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + KnownStorageErrorCode2["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + KnownStorageErrorCode2["BlockListTooLong"] = "BlockListTooLong"; + KnownStorageErrorCode2["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + KnownStorageErrorCode2["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + KnownStorageErrorCode2["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + KnownStorageErrorCode2["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + KnownStorageErrorCode2["ContainerDisabled"] = "ContainerDisabled"; + KnownStorageErrorCode2["ContainerNotFound"] = "ContainerNotFound"; + KnownStorageErrorCode2["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + KnownStorageErrorCode2["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + KnownStorageErrorCode2["CopyIdMismatch"] = "CopyIdMismatch"; + KnownStorageErrorCode2["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + KnownStorageErrorCode2["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + KnownStorageErrorCode2["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + KnownStorageErrorCode2["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + KnownStorageErrorCode2["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + KnownStorageErrorCode2["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + KnownStorageErrorCode2["InvalidBlobTier"] = "InvalidBlobTier"; + KnownStorageErrorCode2["InvalidBlobType"] = "InvalidBlobType"; + KnownStorageErrorCode2["InvalidBlockId"] = "InvalidBlockId"; + KnownStorageErrorCode2["InvalidBlockList"] = "InvalidBlockList"; + KnownStorageErrorCode2["InvalidOperation"] = "InvalidOperation"; + KnownStorageErrorCode2["InvalidPageRange"] = "InvalidPageRange"; + KnownStorageErrorCode2["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + KnownStorageErrorCode2["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + KnownStorageErrorCode2["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + KnownStorageErrorCode2["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + KnownStorageErrorCode2["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + KnownStorageErrorCode2["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + KnownStorageErrorCode2["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + KnownStorageErrorCode2["LeaseIdMissing"] = "LeaseIdMissing"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + KnownStorageErrorCode2["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + KnownStorageErrorCode2["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + KnownStorageErrorCode2["LeaseLost"] = "LeaseLost"; + KnownStorageErrorCode2["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + KnownStorageErrorCode2["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + KnownStorageErrorCode2["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + KnownStorageErrorCode2["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + KnownStorageErrorCode2["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + KnownStorageErrorCode2["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + KnownStorageErrorCode2["PendingCopyOperation"] = "PendingCopyOperation"; + KnownStorageErrorCode2["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + KnownStorageErrorCode2["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + KnownStorageErrorCode2["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + KnownStorageErrorCode2["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + KnownStorageErrorCode2["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + KnownStorageErrorCode2["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + KnownStorageErrorCode2["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + KnownStorageErrorCode2["SnapshotsPresent"] = "SnapshotsPresent"; + KnownStorageErrorCode2["SourceConditionNotMet"] = "SourceConditionNotMet"; + KnownStorageErrorCode2["SystemInUse"] = "SystemInUse"; + KnownStorageErrorCode2["TargetConditionNotMet"] = "TargetConditionNotMet"; + KnownStorageErrorCode2["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + KnownStorageErrorCode2["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + KnownStorageErrorCode2["BlobArchived"] = "BlobArchived"; + KnownStorageErrorCode2["BlobNotArchived"] = "BlobNotArchived"; + KnownStorageErrorCode2["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + KnownStorageErrorCode2["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + KnownStorageErrorCode2["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + KnownStorageErrorCode2["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + KnownStorageErrorCode2["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + KnownStorageErrorCode2["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; + })(KnownStorageErrorCode || (exports2.KnownStorageErrorCode = KnownStorageErrorCode = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js +var require_mappers = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/mappers.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceGetUserDelegationKeyHeaders = exports2.ServiceListContainersSegmentExceptionHeaders = exports2.ServiceListContainersSegmentHeaders = exports2.ServiceGetStatisticsExceptionHeaders = exports2.ServiceGetStatisticsHeaders = exports2.ServiceGetPropertiesExceptionHeaders = exports2.ServiceGetPropertiesHeaders = exports2.ServiceSetPropertiesExceptionHeaders = exports2.ServiceSetPropertiesHeaders = exports2.ArrowField = exports2.ArrowConfiguration = exports2.JsonTextConfiguration = exports2.DelimitedTextConfiguration = exports2.QueryFormat = exports2.QuerySerialization = exports2.QueryRequest = exports2.ClearRange = exports2.PageRange = exports2.PageList = exports2.Block = exports2.BlockList = exports2.BlockLookupList = exports2.BlobPrefix = exports2.BlobHierarchyListSegment = exports2.ListBlobsHierarchySegmentResponse = exports2.BlobPropertiesInternal = exports2.BlobName = exports2.BlobItemInternal = exports2.BlobFlatListSegment = exports2.ListBlobsFlatSegmentResponse = exports2.AccessPolicy = exports2.SignedIdentifier = exports2.BlobTag = exports2.BlobTags = exports2.FilterBlobItem = exports2.FilterBlobSegment = exports2.UserDelegationKey = exports2.KeyInfo = exports2.ContainerProperties = exports2.ContainerItem = exports2.ListContainersSegmentResponse = exports2.GeoReplication = exports2.BlobServiceStatistics = exports2.StorageError = exports2.StaticWebsite = exports2.CorsRule = exports2.Metrics = exports2.RetentionPolicy = exports2.Logging = exports2.BlobServiceProperties = void 0; + exports2.BlobUndeleteHeaders = exports2.BlobDeleteExceptionHeaders = exports2.BlobDeleteHeaders = exports2.BlobGetPropertiesExceptionHeaders = exports2.BlobGetPropertiesHeaders = exports2.BlobDownloadExceptionHeaders = exports2.BlobDownloadHeaders = exports2.ContainerGetAccountInfoExceptionHeaders = exports2.ContainerGetAccountInfoHeaders = exports2.ContainerListBlobHierarchySegmentExceptionHeaders = exports2.ContainerListBlobHierarchySegmentHeaders = exports2.ContainerListBlobFlatSegmentExceptionHeaders = exports2.ContainerListBlobFlatSegmentHeaders = exports2.ContainerChangeLeaseExceptionHeaders = exports2.ContainerChangeLeaseHeaders = exports2.ContainerBreakLeaseExceptionHeaders = exports2.ContainerBreakLeaseHeaders = exports2.ContainerRenewLeaseExceptionHeaders = exports2.ContainerRenewLeaseHeaders = exports2.ContainerReleaseLeaseExceptionHeaders = exports2.ContainerReleaseLeaseHeaders = exports2.ContainerAcquireLeaseExceptionHeaders = exports2.ContainerAcquireLeaseHeaders = exports2.ContainerFilterBlobsExceptionHeaders = exports2.ContainerFilterBlobsHeaders = exports2.ContainerSubmitBatchExceptionHeaders = exports2.ContainerSubmitBatchHeaders = exports2.ContainerRenameExceptionHeaders = exports2.ContainerRenameHeaders = exports2.ContainerRestoreExceptionHeaders = exports2.ContainerRestoreHeaders = exports2.ContainerSetAccessPolicyExceptionHeaders = exports2.ContainerSetAccessPolicyHeaders = exports2.ContainerGetAccessPolicyExceptionHeaders = exports2.ContainerGetAccessPolicyHeaders = exports2.ContainerSetMetadataExceptionHeaders = exports2.ContainerSetMetadataHeaders = exports2.ContainerDeleteExceptionHeaders = exports2.ContainerDeleteHeaders = exports2.ContainerGetPropertiesExceptionHeaders = exports2.ContainerGetPropertiesHeaders = exports2.ContainerCreateExceptionHeaders = exports2.ContainerCreateHeaders = exports2.ServiceFilterBlobsExceptionHeaders = exports2.ServiceFilterBlobsHeaders = exports2.ServiceSubmitBatchExceptionHeaders = exports2.ServiceSubmitBatchHeaders = exports2.ServiceGetAccountInfoExceptionHeaders = exports2.ServiceGetAccountInfoHeaders = exports2.ServiceGetUserDelegationKeyExceptionHeaders = void 0; + exports2.PageBlobGetPageRangesHeaders = exports2.PageBlobUploadPagesFromURLExceptionHeaders = exports2.PageBlobUploadPagesFromURLHeaders = exports2.PageBlobClearPagesExceptionHeaders = exports2.PageBlobClearPagesHeaders = exports2.PageBlobUploadPagesExceptionHeaders = exports2.PageBlobUploadPagesHeaders = exports2.PageBlobCreateExceptionHeaders = exports2.PageBlobCreateHeaders = exports2.BlobSetTagsExceptionHeaders = exports2.BlobSetTagsHeaders = exports2.BlobGetTagsExceptionHeaders = exports2.BlobGetTagsHeaders = exports2.BlobQueryExceptionHeaders = exports2.BlobQueryHeaders = exports2.BlobGetAccountInfoExceptionHeaders = exports2.BlobGetAccountInfoHeaders = exports2.BlobSetTierExceptionHeaders = exports2.BlobSetTierHeaders = exports2.BlobAbortCopyFromURLExceptionHeaders = exports2.BlobAbortCopyFromURLHeaders = exports2.BlobCopyFromURLExceptionHeaders = exports2.BlobCopyFromURLHeaders = exports2.BlobStartCopyFromURLExceptionHeaders = exports2.BlobStartCopyFromURLHeaders = exports2.BlobCreateSnapshotExceptionHeaders = exports2.BlobCreateSnapshotHeaders = exports2.BlobBreakLeaseExceptionHeaders = exports2.BlobBreakLeaseHeaders = exports2.BlobChangeLeaseExceptionHeaders = exports2.BlobChangeLeaseHeaders = exports2.BlobRenewLeaseExceptionHeaders = exports2.BlobRenewLeaseHeaders = exports2.BlobReleaseLeaseExceptionHeaders = exports2.BlobReleaseLeaseHeaders = exports2.BlobAcquireLeaseExceptionHeaders = exports2.BlobAcquireLeaseHeaders = exports2.BlobSetMetadataExceptionHeaders = exports2.BlobSetMetadataHeaders = exports2.BlobSetLegalHoldExceptionHeaders = exports2.BlobSetLegalHoldHeaders = exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = exports2.BlobDeleteImmutabilityPolicyHeaders = exports2.BlobSetImmutabilityPolicyExceptionHeaders = exports2.BlobSetImmutabilityPolicyHeaders = exports2.BlobSetHttpHeadersExceptionHeaders = exports2.BlobSetHttpHeadersHeaders = exports2.BlobSetExpiryExceptionHeaders = exports2.BlobSetExpiryHeaders = exports2.BlobUndeleteExceptionHeaders = void 0; + exports2.BlockBlobGetBlockListExceptionHeaders = exports2.BlockBlobGetBlockListHeaders = exports2.BlockBlobCommitBlockListExceptionHeaders = exports2.BlockBlobCommitBlockListHeaders = exports2.BlockBlobStageBlockFromURLExceptionHeaders = exports2.BlockBlobStageBlockFromURLHeaders = exports2.BlockBlobStageBlockExceptionHeaders = exports2.BlockBlobStageBlockHeaders = exports2.BlockBlobPutBlobFromUrlExceptionHeaders = exports2.BlockBlobPutBlobFromUrlHeaders = exports2.BlockBlobUploadExceptionHeaders = exports2.BlockBlobUploadHeaders = exports2.AppendBlobSealExceptionHeaders = exports2.AppendBlobSealHeaders = exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = exports2.AppendBlobAppendBlockFromUrlHeaders = exports2.AppendBlobAppendBlockExceptionHeaders = exports2.AppendBlobAppendBlockHeaders = exports2.AppendBlobCreateExceptionHeaders = exports2.AppendBlobCreateHeaders = exports2.PageBlobCopyIncrementalExceptionHeaders = exports2.PageBlobCopyIncrementalHeaders = exports2.PageBlobUpdateSequenceNumberExceptionHeaders = exports2.PageBlobUpdateSequenceNumberHeaders = exports2.PageBlobResizeExceptionHeaders = exports2.PageBlobResizeHeaders = exports2.PageBlobGetPageRangesDiffExceptionHeaders = exports2.PageBlobGetPageRangesDiffHeaders = exports2.PageBlobGetPageRangesExceptionHeaders = void 0; + exports2.BlobServiceProperties = { serializedName: "BlobServiceProperties", xmlName: "StorageServiceProperties", type: { @@ -47433,7 +50735,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Logging = { + exports2.Logging = { serializedName: "Logging", type: { name: "Composite", @@ -47482,7 +50784,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var RetentionPolicy = { + exports2.RetentionPolicy = { serializedName: "RetentionPolicy", type: { name: "Composite", @@ -47509,7 +50811,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Metrics = { + exports2.Metrics = { serializedName: "Metrics", type: { name: "Composite", @@ -47548,7 +50850,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var CorsRule = { + exports2.CorsRule = { serializedName: "CorsRule", type: { name: "Composite", @@ -47600,7 +50902,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StaticWebsite = { + exports2.StaticWebsite = { serializedName: "StaticWebsite", type: { name: "Composite", @@ -47638,7 +50940,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var StorageError = { + exports2.StorageError = { serializedName: "StorageError", type: { name: "Composite", @@ -47651,6 +50953,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; name: "String" } }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number" + } + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String" + } + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String" + } + }, code: { serializedName: "Code", xmlName: "Code", @@ -47668,7 +50991,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobServiceStatistics = { + exports2.BlobServiceStatistics = { serializedName: "BlobServiceStatistics", xmlName: "StorageServiceStats", type: { @@ -47686,7 +51009,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var GeoReplication = { + exports2.GeoReplication = { serializedName: "GeoReplication", type: { name: "Composite", @@ -47712,7 +51035,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListContainersSegmentResponse = { + exports2.ListContainersSegmentResponse = { serializedName: "ListContainersSegmentResponse", xmlName: "EnumerationResults", type: { @@ -47775,7 +51098,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerItem = { + exports2.ContainerItem = { serializedName: "ContainerItem", xmlName: "Container", type: { @@ -47823,7 +51146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerProperties = { + exports2.ContainerProperties = { serializedName: "ContainerProperties", type: { name: "Composite", @@ -47935,7 +51258,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var KeyInfo = { + exports2.KeyInfo = { serializedName: "KeyInfo", type: { name: "Composite", @@ -47960,7 +51283,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var UserDelegationKey = { + exports2.UserDelegationKey = { serializedName: "UserDelegationKey", type: { name: "Composite", @@ -48025,7 +51348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobSegment = { + exports2.FilterBlobSegment = { serializedName: "FilterBlobSegment", xmlName: "EnumerationResults", type: { @@ -48075,7 +51398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var FilterBlobItem = { + exports2.FilterBlobItem = { serializedName: "FilterBlobItem", xmlName: "Blob", type: { @@ -48109,7 +51432,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTags = { + exports2.BlobTags = { serializedName: "BlobTags", xmlName: "Tags", type: { @@ -48135,7 +51458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobTag = { + exports2.BlobTag = { serializedName: "BlobTag", xmlName: "Tag", type: { @@ -48161,7 +51484,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var SignedIdentifier = { + exports2.SignedIdentifier = { serializedName: "SignedIdentifier", xmlName: "SignedIdentifier", type: { @@ -48187,7 +51510,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AccessPolicy = { + exports2.AccessPolicy = { serializedName: "AccessPolicy", type: { name: "Composite", @@ -48217,7 +51540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsFlatSegmentResponse = { + exports2.ListBlobsFlatSegmentResponse = { serializedName: "ListBlobsFlatSegmentResponse", xmlName: "EnumerationResults", type: { @@ -48281,7 +51604,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobFlatListSegment = { + exports2.BlobFlatListSegment = { serializedName: "BlobFlatListSegment", xmlName: "Blobs", type: { @@ -48306,7 +51629,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobItemInternal = { + exports2.BlobItemInternal = { serializedName: "BlobItemInternal", xmlName: "Blob", type: { @@ -48393,7 +51716,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobName = { + exports2.BlobName = { serializedName: "BlobName", type: { name: "Composite", @@ -48418,7 +51741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPropertiesInternal = { + exports2.BlobPropertiesInternal = { serializedName: "BlobPropertiesInternal", xmlName: "Properties", type: { @@ -48745,7 +52068,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ListBlobsHierarchySegmentResponse = { + exports2.ListBlobsHierarchySegmentResponse = { serializedName: "ListBlobsHierarchySegmentResponse", xmlName: "EnumerationResults", type: { @@ -48816,7 +52139,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobHierarchyListSegment = { + exports2.BlobHierarchyListSegment = { serializedName: "BlobHierarchyListSegment", xmlName: "Blobs", type: { @@ -48855,7 +52178,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobPrefix = { + exports2.BlobPrefix = { serializedName: "BlobPrefix", type: { name: "Composite", @@ -48872,7 +52195,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockLookupList = { + exports2.BlockLookupList = { serializedName: "BlockLookupList", xmlName: "BlockList", type: { @@ -48921,7 +52244,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockList = { + exports2.BlockList = { serializedName: "BlockList", type: { name: "Composite", @@ -48960,7 +52283,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Block = { + exports2.Block = { serializedName: "Block", type: { name: "Composite", @@ -48985,7 +52308,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageList = { + exports2.PageList = { serializedName: "PageList", type: { name: "Composite", @@ -49029,7 +52352,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageRange = { + exports2.PageRange = { serializedName: "PageRange", xmlName: "PageRange", type: { @@ -49055,7 +52378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ClearRange = { + exports2.ClearRange = { serializedName: "ClearRange", xmlName: "ClearRange", type: { @@ -49081,7 +52404,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryRequest = { + exports2.QueryRequest = { serializedName: "QueryRequest", xmlName: "QueryRequest", type: { @@ -49123,7 +52446,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QuerySerialization = { + exports2.QuerySerialization = { serializedName: "QuerySerialization", type: { name: "Composite", @@ -49140,7 +52463,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var QueryFormat = { + exports2.QueryFormat = { serializedName: "QueryFormat", type: { name: "Composite", @@ -49190,7 +52513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var DelimitedTextConfiguration = { + exports2.DelimitedTextConfiguration = { serializedName: "DelimitedTextConfiguration", xmlName: "DelimitedTextConfiguration", type: { @@ -49235,7 +52558,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var JsonTextConfiguration = { + exports2.JsonTextConfiguration = { serializedName: "JsonTextConfiguration", xmlName: "JsonTextConfiguration", type: { @@ -49252,7 +52575,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowConfiguration = { + exports2.ArrowConfiguration = { serializedName: "ArrowConfiguration", xmlName: "ArrowConfiguration", type: { @@ -49278,7 +52601,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ArrowField = { + exports2.ArrowField = { serializedName: "ArrowField", xmlName: "Field", type: { @@ -49317,7 +52640,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesHeaders = { + exports2.ServiceSetPropertiesHeaders = { serializedName: "Service_setPropertiesHeaders", type: { name: "Composite", @@ -49354,7 +52677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSetPropertiesExceptionHeaders = { + exports2.ServiceSetPropertiesExceptionHeaders = { serializedName: "Service_setPropertiesExceptionHeaders", type: { name: "Composite", @@ -49370,7 +52693,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesHeaders = { + exports2.ServiceGetPropertiesHeaders = { serializedName: "Service_getPropertiesHeaders", type: { name: "Composite", @@ -49407,7 +52730,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetPropertiesExceptionHeaders = { + exports2.ServiceGetPropertiesExceptionHeaders = { serializedName: "Service_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -49423,7 +52746,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsHeaders = { + exports2.ServiceGetStatisticsHeaders = { serializedName: "Service_getStatisticsHeaders", type: { name: "Composite", @@ -49467,7 +52790,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetStatisticsExceptionHeaders = { + exports2.ServiceGetStatisticsExceptionHeaders = { serializedName: "Service_getStatisticsExceptionHeaders", type: { name: "Composite", @@ -49483,7 +52806,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentHeaders = { + exports2.ServiceListContainersSegmentHeaders = { serializedName: "Service_listContainersSegmentHeaders", type: { name: "Composite", @@ -49520,7 +52843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceListContainersSegmentExceptionHeaders = { + exports2.ServiceListContainersSegmentExceptionHeaders = { serializedName: "Service_listContainersSegmentExceptionHeaders", type: { name: "Composite", @@ -49536,7 +52859,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyHeaders = { + exports2.ServiceGetUserDelegationKeyHeaders = { serializedName: "Service_getUserDelegationKeyHeaders", type: { name: "Composite", @@ -49580,7 +52903,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetUserDelegationKeyExceptionHeaders = { + exports2.ServiceGetUserDelegationKeyExceptionHeaders = { serializedName: "Service_getUserDelegationKeyExceptionHeaders", type: { name: "Composite", @@ -49596,7 +52919,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoHeaders = { + exports2.ServiceGetAccountInfoHeaders = { serializedName: "Service_getAccountInfoHeaders", type: { name: "Composite", @@ -49675,7 +52998,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceGetAccountInfoExceptionHeaders = { + exports2.ServiceGetAccountInfoExceptionHeaders = { serializedName: "Service_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -49691,7 +53014,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchHeaders = { + exports2.ServiceSubmitBatchHeaders = { serializedName: "Service_submitBatchHeaders", type: { name: "Composite", @@ -49735,7 +53058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceSubmitBatchExceptionHeaders = { + exports2.ServiceSubmitBatchExceptionHeaders = { serializedName: "Service_submitBatchExceptionHeaders", type: { name: "Composite", @@ -49751,7 +53074,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsHeaders = { + exports2.ServiceFilterBlobsHeaders = { serializedName: "Service_filterBlobsHeaders", type: { name: "Composite", @@ -49795,7 +53118,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ServiceFilterBlobsExceptionHeaders = { + exports2.ServiceFilterBlobsExceptionHeaders = { serializedName: "Service_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -49811,7 +53134,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateHeaders = { + exports2.ContainerCreateHeaders = { serializedName: "Container_createHeaders", type: { name: "Composite", @@ -49869,7 +53192,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerCreateExceptionHeaders = { + exports2.ContainerCreateExceptionHeaders = { serializedName: "Container_createExceptionHeaders", type: { name: "Composite", @@ -49885,7 +53208,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesHeaders = { + exports2.ContainerGetPropertiesHeaders = { serializedName: "Container_getPropertiesHeaders", type: { name: "Composite", @@ -50025,7 +53348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetPropertiesExceptionHeaders = { + exports2.ContainerGetPropertiesExceptionHeaders = { serializedName: "Container_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -50041,7 +53364,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteHeaders = { + exports2.ContainerDeleteHeaders = { serializedName: "Container_deleteHeaders", type: { name: "Composite", @@ -50085,7 +53408,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerDeleteExceptionHeaders = { + exports2.ContainerDeleteExceptionHeaders = { serializedName: "Container_deleteExceptionHeaders", type: { name: "Composite", @@ -50101,7 +53424,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataHeaders = { + exports2.ContainerSetMetadataHeaders = { serializedName: "Container_setMetadataHeaders", type: { name: "Composite", @@ -50159,7 +53482,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetMetadataExceptionHeaders = { + exports2.ContainerSetMetadataExceptionHeaders = { serializedName: "Container_setMetadataExceptionHeaders", type: { name: "Composite", @@ -50175,7 +53498,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyHeaders = { + exports2.ContainerGetAccessPolicyHeaders = { serializedName: "Container_getAccessPolicyHeaders", type: { name: "Composite", @@ -50241,7 +53564,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccessPolicyExceptionHeaders = { + exports2.ContainerGetAccessPolicyExceptionHeaders = { serializedName: "Container_getAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -50257,7 +53580,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyHeaders = { + exports2.ContainerSetAccessPolicyHeaders = { serializedName: "Container_setAccessPolicyHeaders", type: { name: "Composite", @@ -50315,7 +53638,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSetAccessPolicyExceptionHeaders = { + exports2.ContainerSetAccessPolicyExceptionHeaders = { serializedName: "Container_setAccessPolicyExceptionHeaders", type: { name: "Composite", @@ -50331,7 +53654,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreHeaders = { + exports2.ContainerRestoreHeaders = { serializedName: "Container_restoreHeaders", type: { name: "Composite", @@ -50375,7 +53698,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRestoreExceptionHeaders = { + exports2.ContainerRestoreExceptionHeaders = { serializedName: "Container_restoreExceptionHeaders", type: { name: "Composite", @@ -50391,7 +53714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameHeaders = { + exports2.ContainerRenameHeaders = { serializedName: "Container_renameHeaders", type: { name: "Composite", @@ -50435,7 +53758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenameExceptionHeaders = { + exports2.ContainerRenameExceptionHeaders = { serializedName: "Container_renameExceptionHeaders", type: { name: "Composite", @@ -50451,7 +53774,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchHeaders = { + exports2.ContainerSubmitBatchHeaders = { serializedName: "Container_submitBatchHeaders", type: { name: "Composite", @@ -50481,7 +53804,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerSubmitBatchExceptionHeaders = { + exports2.ContainerSubmitBatchExceptionHeaders = { serializedName: "Container_submitBatchExceptionHeaders", type: { name: "Composite", @@ -50497,7 +53820,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsHeaders = { + exports2.ContainerFilterBlobsHeaders = { serializedName: "Container_filterBlobsHeaders", type: { name: "Composite", @@ -50534,7 +53857,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerFilterBlobsExceptionHeaders = { + exports2.ContainerFilterBlobsExceptionHeaders = { serializedName: "Container_filterBlobsExceptionHeaders", type: { name: "Composite", @@ -50550,7 +53873,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseHeaders = { + exports2.ContainerAcquireLeaseHeaders = { serializedName: "Container_acquireLeaseHeaders", type: { name: "Composite", @@ -50608,7 +53931,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerAcquireLeaseExceptionHeaders = { + exports2.ContainerAcquireLeaseExceptionHeaders = { serializedName: "Container_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -50624,7 +53947,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseHeaders = { + exports2.ContainerReleaseLeaseHeaders = { serializedName: "Container_releaseLeaseHeaders", type: { name: "Composite", @@ -50675,7 +53998,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerReleaseLeaseExceptionHeaders = { + exports2.ContainerReleaseLeaseExceptionHeaders = { serializedName: "Container_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -50691,7 +54014,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseHeaders = { + exports2.ContainerRenewLeaseHeaders = { serializedName: "Container_renewLeaseHeaders", type: { name: "Composite", @@ -50749,7 +54072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerRenewLeaseExceptionHeaders = { + exports2.ContainerRenewLeaseExceptionHeaders = { serializedName: "Container_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -50765,7 +54088,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseHeaders = { + exports2.ContainerBreakLeaseHeaders = { serializedName: "Container_breakLeaseHeaders", type: { name: "Composite", @@ -50823,7 +54146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerBreakLeaseExceptionHeaders = { + exports2.ContainerBreakLeaseExceptionHeaders = { serializedName: "Container_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -50839,7 +54162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseHeaders = { + exports2.ContainerChangeLeaseHeaders = { serializedName: "Container_changeLeaseHeaders", type: { name: "Composite", @@ -50897,7 +54220,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerChangeLeaseExceptionHeaders = { + exports2.ContainerChangeLeaseExceptionHeaders = { serializedName: "Container_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -50913,7 +54236,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentHeaders = { + exports2.ContainerListBlobFlatSegmentHeaders = { serializedName: "Container_listBlobFlatSegmentHeaders", type: { name: "Composite", @@ -50964,7 +54287,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobFlatSegmentExceptionHeaders = { + exports2.ContainerListBlobFlatSegmentExceptionHeaders = { serializedName: "Container_listBlobFlatSegmentExceptionHeaders", type: { name: "Composite", @@ -50980,7 +54303,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentHeaders = { + exports2.ContainerListBlobHierarchySegmentHeaders = { serializedName: "Container_listBlobHierarchySegmentHeaders", type: { name: "Composite", @@ -51031,7 +54354,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerListBlobHierarchySegmentExceptionHeaders = { + exports2.ContainerListBlobHierarchySegmentExceptionHeaders = { serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", type: { name: "Composite", @@ -51047,7 +54370,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoHeaders = { + exports2.ContainerGetAccountInfoHeaders = { serializedName: "Container_getAccountInfoHeaders", type: { name: "Composite", @@ -51119,7 +54442,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ContainerGetAccountInfoExceptionHeaders = { + exports2.ContainerGetAccountInfoExceptionHeaders = { serializedName: "Container_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -51135,7 +54458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadHeaders = { + exports2.BlobDownloadHeaders = { serializedName: "Blob_downloadHeaders", type: { name: "Composite", @@ -51475,7 +54798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDownloadExceptionHeaders = { + exports2.BlobDownloadExceptionHeaders = { serializedName: "Blob_downloadExceptionHeaders", type: { name: "Composite", @@ -51491,7 +54814,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesHeaders = { + exports2.BlobGetPropertiesHeaders = { serializedName: "Blob_getPropertiesHeaders", type: { name: "Composite", @@ -51867,7 +55190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetPropertiesExceptionHeaders = { + exports2.BlobGetPropertiesExceptionHeaders = { serializedName: "Blob_getPropertiesExceptionHeaders", type: { name: "Composite", @@ -51883,7 +55206,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteHeaders = { + exports2.BlobDeleteHeaders = { serializedName: "Blob_deleteHeaders", type: { name: "Composite", @@ -51927,7 +55250,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteExceptionHeaders = { + exports2.BlobDeleteExceptionHeaders = { serializedName: "Blob_deleteExceptionHeaders", type: { name: "Composite", @@ -51943,7 +55266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteHeaders = { + exports2.BlobUndeleteHeaders = { serializedName: "Blob_undeleteHeaders", type: { name: "Composite", @@ -51987,7 +55310,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobUndeleteExceptionHeaders = { + exports2.BlobUndeleteExceptionHeaders = { serializedName: "Blob_undeleteExceptionHeaders", type: { name: "Composite", @@ -52003,7 +55326,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryHeaders = { + exports2.BlobSetExpiryHeaders = { serializedName: "Blob_setExpiryHeaders", type: { name: "Composite", @@ -52054,7 +55377,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetExpiryExceptionHeaders = { + exports2.BlobSetExpiryExceptionHeaders = { serializedName: "Blob_setExpiryExceptionHeaders", type: { name: "Composite", @@ -52070,7 +55393,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersHeaders = { + exports2.BlobSetHttpHeadersHeaders = { serializedName: "Blob_setHttpHeadersHeaders", type: { name: "Composite", @@ -52135,7 +55458,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetHttpHeadersExceptionHeaders = { + exports2.BlobSetHttpHeadersExceptionHeaders = { serializedName: "Blob_setHttpHeadersExceptionHeaders", type: { name: "Composite", @@ -52151,7 +55474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyHeaders = { + exports2.BlobSetImmutabilityPolicyHeaders = { serializedName: "Blob_setImmutabilityPolicyHeaders", type: { name: "Composite", @@ -52203,7 +55526,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetImmutabilityPolicyExceptionHeaders = { + exports2.BlobSetImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -52219,7 +55542,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyHeaders = { + exports2.BlobDeleteImmutabilityPolicyHeaders = { serializedName: "Blob_deleteImmutabilityPolicyHeaders", type: { name: "Composite", @@ -52256,7 +55579,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobDeleteImmutabilityPolicyExceptionHeaders = { + exports2.BlobDeleteImmutabilityPolicyExceptionHeaders = { serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", type: { name: "Composite", @@ -52272,7 +55595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldHeaders = { + exports2.BlobSetLegalHoldHeaders = { serializedName: "Blob_setLegalHoldHeaders", type: { name: "Composite", @@ -52316,7 +55639,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetLegalHoldExceptionHeaders = { + exports2.BlobSetLegalHoldExceptionHeaders = { serializedName: "Blob_setLegalHoldExceptionHeaders", type: { name: "Composite", @@ -52332,7 +55655,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataHeaders = { + exports2.BlobSetMetadataHeaders = { serializedName: "Blob_setMetadataHeaders", type: { name: "Composite", @@ -52418,7 +55741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetMetadataExceptionHeaders = { + exports2.BlobSetMetadataExceptionHeaders = { serializedName: "Blob_setMetadataExceptionHeaders", type: { name: "Composite", @@ -52434,7 +55757,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseHeaders = { + exports2.BlobAcquireLeaseHeaders = { serializedName: "Blob_acquireLeaseHeaders", type: { name: "Composite", @@ -52492,7 +55815,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAcquireLeaseExceptionHeaders = { + exports2.BlobAcquireLeaseExceptionHeaders = { serializedName: "Blob_acquireLeaseExceptionHeaders", type: { name: "Composite", @@ -52508,7 +55831,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseHeaders = { + exports2.BlobReleaseLeaseHeaders = { serializedName: "Blob_releaseLeaseHeaders", type: { name: "Composite", @@ -52559,7 +55882,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobReleaseLeaseExceptionHeaders = { + exports2.BlobReleaseLeaseExceptionHeaders = { serializedName: "Blob_releaseLeaseExceptionHeaders", type: { name: "Composite", @@ -52575,7 +55898,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseHeaders = { + exports2.BlobRenewLeaseHeaders = { serializedName: "Blob_renewLeaseHeaders", type: { name: "Composite", @@ -52633,7 +55956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobRenewLeaseExceptionHeaders = { + exports2.BlobRenewLeaseExceptionHeaders = { serializedName: "Blob_renewLeaseExceptionHeaders", type: { name: "Composite", @@ -52649,7 +55972,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseHeaders = { + exports2.BlobChangeLeaseHeaders = { serializedName: "Blob_changeLeaseHeaders", type: { name: "Composite", @@ -52707,7 +56030,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobChangeLeaseExceptionHeaders = { + exports2.BlobChangeLeaseExceptionHeaders = { serializedName: "Blob_changeLeaseExceptionHeaders", type: { name: "Composite", @@ -52723,7 +56046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseHeaders = { + exports2.BlobBreakLeaseHeaders = { serializedName: "Blob_breakLeaseHeaders", type: { name: "Composite", @@ -52781,7 +56104,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobBreakLeaseExceptionHeaders = { + exports2.BlobBreakLeaseExceptionHeaders = { serializedName: "Blob_breakLeaseExceptionHeaders", type: { name: "Composite", @@ -52797,7 +56120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotHeaders = { + exports2.BlobCreateSnapshotHeaders = { serializedName: "Blob_createSnapshotHeaders", type: { name: "Composite", @@ -52876,7 +56199,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCreateSnapshotExceptionHeaders = { + exports2.BlobCreateSnapshotExceptionHeaders = { serializedName: "Blob_createSnapshotExceptionHeaders", type: { name: "Composite", @@ -52892,7 +56215,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLHeaders = { + exports2.BlobStartCopyFromURLHeaders = { serializedName: "Blob_startCopyFromURLHeaders", type: { name: "Composite", @@ -52972,7 +56295,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobStartCopyFromURLExceptionHeaders = { + exports2.BlobStartCopyFromURLExceptionHeaders = { serializedName: "Blob_startCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -52984,11 +56307,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobCopyFromURLHeaders = { + exports2.BlobCopyFromURLHeaders = { serializedName: "Blob_copyFromURLHeaders", type: { name: "Composite", @@ -53089,7 +56426,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobCopyFromURLExceptionHeaders = { + exports2.BlobCopyFromURLExceptionHeaders = { serializedName: "Blob_copyFromURLExceptionHeaders", type: { name: "Composite", @@ -53101,11 +56438,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlobAbortCopyFromURLHeaders = { + exports2.BlobAbortCopyFromURLHeaders = { serializedName: "Blob_abortCopyFromURLHeaders", type: { name: "Composite", @@ -53149,7 +56500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobAbortCopyFromURLExceptionHeaders = { + exports2.BlobAbortCopyFromURLExceptionHeaders = { serializedName: "Blob_abortCopyFromURLExceptionHeaders", type: { name: "Composite", @@ -53165,7 +56516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierHeaders = { + exports2.BlobSetTierHeaders = { serializedName: "Blob_setTierHeaders", type: { name: "Composite", @@ -53202,7 +56553,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTierExceptionHeaders = { + exports2.BlobSetTierExceptionHeaders = { serializedName: "Blob_setTierExceptionHeaders", type: { name: "Composite", @@ -53218,7 +56569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoHeaders = { + exports2.BlobGetAccountInfoHeaders = { serializedName: "Blob_getAccountInfoHeaders", type: { name: "Composite", @@ -53290,7 +56641,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetAccountInfoExceptionHeaders = { + exports2.BlobGetAccountInfoExceptionHeaders = { serializedName: "Blob_getAccountInfoExceptionHeaders", type: { name: "Composite", @@ -53306,7 +56657,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryHeaders = { + exports2.BlobQueryHeaders = { serializedName: "Blob_queryHeaders", type: { name: "Composite", @@ -53566,7 +56917,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQueryExceptionHeaders = { + exports2.BlobQueryExceptionHeaders = { serializedName: "Blob_queryExceptionHeaders", type: { name: "Composite", @@ -53582,7 +56933,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsHeaders = { + exports2.BlobGetTagsHeaders = { serializedName: "Blob_getTagsHeaders", type: { name: "Composite", @@ -53626,7 +56977,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobGetTagsExceptionHeaders = { + exports2.BlobGetTagsExceptionHeaders = { serializedName: "Blob_getTagsExceptionHeaders", type: { name: "Composite", @@ -53642,7 +56993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsHeaders = { + exports2.BlobSetTagsHeaders = { serializedName: "Blob_setTagsHeaders", type: { name: "Composite", @@ -53686,7 +57037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobSetTagsExceptionHeaders = { + exports2.BlobSetTagsExceptionHeaders = { serializedName: "Blob_setTagsExceptionHeaders", type: { name: "Composite", @@ -53702,7 +57053,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateHeaders = { + exports2.PageBlobCreateHeaders = { serializedName: "PageBlob_createHeaders", type: { name: "Composite", @@ -53795,7 +57146,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCreateExceptionHeaders = { + exports2.PageBlobCreateExceptionHeaders = { serializedName: "PageBlob_createExceptionHeaders", type: { name: "Composite", @@ -53811,7 +57162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesHeaders = { + exports2.PageBlobUploadPagesHeaders = { serializedName: "PageBlob_uploadPagesHeaders", type: { name: "Composite", @@ -53911,7 +57262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesExceptionHeaders = { + exports2.PageBlobUploadPagesExceptionHeaders = { serializedName: "PageBlob_uploadPagesExceptionHeaders", type: { name: "Composite", @@ -53927,7 +57278,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesHeaders = { + exports2.PageBlobClearPagesHeaders = { serializedName: "PageBlob_clearPagesHeaders", type: { name: "Composite", @@ -54006,7 +57357,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobClearPagesExceptionHeaders = { + exports2.PageBlobClearPagesExceptionHeaders = { serializedName: "PageBlob_clearPagesExceptionHeaders", type: { name: "Composite", @@ -54022,7 +57373,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLHeaders = { + exports2.PageBlobUploadPagesFromURLHeaders = { serializedName: "PageBlob_uploadPagesFromURLHeaders", type: { name: "Composite", @@ -54115,7 +57466,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUploadPagesFromURLExceptionHeaders = { + exports2.PageBlobUploadPagesFromURLExceptionHeaders = { serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", type: { name: "Composite", @@ -54127,11 +57478,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var PageBlobGetPageRangesHeaders = { + exports2.PageBlobGetPageRangesHeaders = { serializedName: "PageBlob_getPageRangesHeaders", type: { name: "Composite", @@ -54196,7 +57561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesExceptionHeaders = { + exports2.PageBlobGetPageRangesExceptionHeaders = { serializedName: "PageBlob_getPageRangesExceptionHeaders", type: { name: "Composite", @@ -54212,7 +57577,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffHeaders = { + exports2.PageBlobGetPageRangesDiffHeaders = { serializedName: "PageBlob_getPageRangesDiffHeaders", type: { name: "Composite", @@ -54277,7 +57642,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobGetPageRangesDiffExceptionHeaders = { + exports2.PageBlobGetPageRangesDiffExceptionHeaders = { serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", type: { name: "Composite", @@ -54293,7 +57658,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeHeaders = { + exports2.PageBlobResizeHeaders = { serializedName: "PageBlob_resizeHeaders", type: { name: "Composite", @@ -54358,7 +57723,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobResizeExceptionHeaders = { + exports2.PageBlobResizeExceptionHeaders = { serializedName: "PageBlob_resizeExceptionHeaders", type: { name: "Composite", @@ -54374,7 +57739,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberHeaders = { + exports2.PageBlobUpdateSequenceNumberHeaders = { serializedName: "PageBlob_updateSequenceNumberHeaders", type: { name: "Composite", @@ -54439,7 +57804,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobUpdateSequenceNumberExceptionHeaders = { + exports2.PageBlobUpdateSequenceNumberExceptionHeaders = { serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", type: { name: "Composite", @@ -54455,7 +57820,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalHeaders = { + exports2.PageBlobCopyIncrementalHeaders = { serializedName: "PageBlob_copyIncrementalHeaders", type: { name: "Composite", @@ -54528,7 +57893,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var PageBlobCopyIncrementalExceptionHeaders = { + exports2.PageBlobCopyIncrementalExceptionHeaders = { serializedName: "PageBlob_copyIncrementalExceptionHeaders", type: { name: "Composite", @@ -54544,7 +57909,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateHeaders = { + exports2.AppendBlobCreateHeaders = { serializedName: "AppendBlob_createHeaders", type: { name: "Composite", @@ -54637,7 +58002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobCreateExceptionHeaders = { + exports2.AppendBlobCreateExceptionHeaders = { serializedName: "AppendBlob_createExceptionHeaders", type: { name: "Composite", @@ -54653,7 +58018,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockHeaders = { + exports2.AppendBlobAppendBlockHeaders = { serializedName: "AppendBlob_appendBlockHeaders", type: { name: "Composite", @@ -54760,7 +58125,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockExceptionHeaders = { + exports2.AppendBlobAppendBlockExceptionHeaders = { serializedName: "AppendBlob_appendBlockExceptionHeaders", type: { name: "Composite", @@ -54776,7 +58141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlHeaders = { + exports2.AppendBlobAppendBlockFromUrlHeaders = { serializedName: "AppendBlob_appendBlockFromUrlHeaders", type: { name: "Composite", @@ -54876,7 +58241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobAppendBlockFromUrlExceptionHeaders = { + exports2.AppendBlobAppendBlockFromUrlExceptionHeaders = { serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", type: { name: "Composite", @@ -54888,11 +58253,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var AppendBlobSealHeaders = { + exports2.AppendBlobSealHeaders = { serializedName: "AppendBlob_sealHeaders", type: { name: "Composite", @@ -54950,7 +58329,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var AppendBlobSealExceptionHeaders = { + exports2.AppendBlobSealExceptionHeaders = { serializedName: "AppendBlob_sealExceptionHeaders", type: { name: "Composite", @@ -54966,7 +58345,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadHeaders = { + exports2.BlockBlobUploadHeaders = { serializedName: "BlockBlob_uploadHeaders", type: { name: "Composite", @@ -55059,7 +58438,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobUploadExceptionHeaders = { + exports2.BlockBlobUploadExceptionHeaders = { serializedName: "BlockBlob_uploadExceptionHeaders", type: { name: "Composite", @@ -55075,7 +58454,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlHeaders = { + exports2.BlockBlobPutBlobFromUrlHeaders = { serializedName: "BlockBlob_putBlobFromUrlHeaders", type: { name: "Composite", @@ -55168,7 +58547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobPutBlobFromUrlExceptionHeaders = { + exports2.BlockBlobPutBlobFromUrlExceptionHeaders = { serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", type: { name: "Composite", @@ -55180,11 +58559,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobStageBlockHeaders = { + exports2.BlockBlobStageBlockHeaders = { serializedName: "BlockBlob_stageBlockHeaders", type: { name: "Composite", @@ -55263,7 +58656,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockExceptionHeaders = { + exports2.BlockBlobStageBlockExceptionHeaders = { serializedName: "BlockBlob_stageBlockExceptionHeaders", type: { name: "Composite", @@ -55279,7 +58672,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLHeaders = { + exports2.BlockBlobStageBlockFromURLHeaders = { serializedName: "BlockBlob_stageBlockFromURLHeaders", type: { name: "Composite", @@ -55358,7 +58751,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobStageBlockFromURLExceptionHeaders = { + exports2.BlockBlobStageBlockFromURLExceptionHeaders = { serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", type: { name: "Composite", @@ -55370,11 +58763,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "String" } + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String" + } + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number" + } } } } }; - var BlockBlobCommitBlockListHeaders = { + exports2.BlockBlobCommitBlockListHeaders = { serializedName: "BlockBlob_commitBlockListHeaders", type: { name: "Composite", @@ -55474,7 +58881,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobCommitBlockListExceptionHeaders = { + exports2.BlockBlobCommitBlockListExceptionHeaders = { serializedName: "BlockBlob_commitBlockListExceptionHeaders", type: { name: "Composite", @@ -55490,7 +58897,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListHeaders = { + exports2.BlockBlobGetBlockListHeaders = { serializedName: "BlockBlob_getBlockListHeaders", type: { name: "Composite", @@ -55562,7 +58969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlockBlobGetBlockListExceptionHeaders = { + exports2.BlockBlobGetBlockListExceptionHeaders = { serializedName: "BlockBlob_getBlockListExceptionHeaders", type: { name: "Composite", @@ -55578,189 +58985,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var Mappers = /* @__PURE__ */ Object.freeze({ - __proto__: null, - AccessPolicy, - AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders, - ArrowConfiguration, - ArrowField, - BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders, - BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders, - BlobDownloadHeaders, - BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders, - BlobHierarchyListSegment, - BlobItemInternal, - BlobName, - BlobPrefix, - BlobPropertiesInternal, - BlobQueryExceptionHeaders, - BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders, - BlobServiceProperties, - BlobServiceStatistics, - BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders, - BlobSetTierExceptionHeaders, - BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders, - BlobTag, - BlobTags, - BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders, - Block, - BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders, - BlockList, - BlockLookupList, - ClearRange, - ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders, - ContainerCreateHeaders, - ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders, - ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders, - ContainerProperties, - ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders, - ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders, - CorsRule, - DelimitedTextConfiguration, - FilterBlobItem, - FilterBlobSegment, - GeoReplication, - JsonTextConfiguration, - KeyInfo, - ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse, - Logging, - Metrics, - PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders, - PageList, - PageRange, - QueryFormat, - QueryRequest, - QuerySerialization, - RetentionPolicy, - ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders, - SignedIdentifier, - StaticWebsite, - StorageError, - UserDelegationKey - }); - var contentType = { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js +var require_parameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/models/parameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.action3 = exports2.action2 = exports2.leaseId1 = exports2.action1 = exports2.proposedLeaseId = exports2.duration = exports2.action = exports2.comp10 = exports2.sourceLeaseId = exports2.sourceContainerName = exports2.comp9 = exports2.deletedContainerVersion = exports2.deletedContainerName = exports2.comp8 = exports2.containerAcl = exports2.comp7 = exports2.comp6 = exports2.ifUnmodifiedSince = exports2.ifModifiedSince = exports2.leaseId = exports2.preventEncryptionScopeOverride = exports2.defaultEncryptionScope = exports2.access = exports2.metadata = exports2.restype2 = exports2.where = exports2.comp5 = exports2.multipartContentType = exports2.contentLength = exports2.comp4 = exports2.body = exports2.restype1 = exports2.comp3 = exports2.keyInfo = exports2.include = exports2.maxPageSize = exports2.marker = exports2.prefix = exports2.comp2 = exports2.comp1 = exports2.accept1 = exports2.requestId = exports2.version = exports2.timeoutInSeconds = exports2.comp = exports2.restype = exports2.url = exports2.accept = exports2.blobServiceProperties = exports2.contentType = void 0; + exports2.fileRequestIntent = exports2.copySourceTags = exports2.copySourceAuthorization = exports2.sourceContentMD5 = exports2.xMsRequiresSync = exports2.legalHold1 = exports2.sealBlob = exports2.blobTagsString = exports2.copySource = exports2.sourceIfTags = exports2.sourceIfNoneMatch = exports2.sourceIfMatch = exports2.sourceIfUnmodifiedSince = exports2.sourceIfModifiedSince = exports2.rehydratePriority = exports2.tier = exports2.comp14 = exports2.encryptionScope = exports2.legalHold = exports2.comp13 = exports2.immutabilityPolicyMode = exports2.immutabilityPolicyExpiry = exports2.comp12 = exports2.blobContentDisposition = exports2.blobContentLanguage = exports2.blobContentEncoding = exports2.blobContentMD5 = exports2.blobContentType = exports2.blobCacheControl = exports2.expiresOn = exports2.expiryOptions = exports2.comp11 = exports2.blobDeleteType = exports2.deleteSnapshots = exports2.ifTags = exports2.ifNoneMatch = exports2.ifMatch = exports2.encryptionAlgorithm = exports2.encryptionKeySha256 = exports2.encryptionKey = exports2.rangeGetContentCRC64 = exports2.rangeGetContentMD5 = exports2.range = exports2.versionId = exports2.snapshot = exports2.delimiter = exports2.include1 = exports2.proposedLeaseId1 = exports2.action4 = exports2.breakPeriod = void 0; + exports2.listType = exports2.comp25 = exports2.blocks = exports2.blockId = exports2.comp24 = exports2.copySourceBlobProperties = exports2.blobType2 = exports2.comp23 = exports2.sourceRange1 = exports2.appendPosition = exports2.maxSize = exports2.comp22 = exports2.blobType1 = exports2.comp21 = exports2.sequenceNumberAction = exports2.prevSnapshotUrl = exports2.prevsnapshot = exports2.comp20 = exports2.range1 = exports2.sourceContentCrc64 = exports2.sourceRange = exports2.sourceUrl = exports2.pageWrite1 = exports2.ifSequenceNumberEqualTo = exports2.ifSequenceNumberLessThan = exports2.ifSequenceNumberLessThanOrEqualTo = exports2.pageWrite = exports2.comp19 = exports2.accept2 = exports2.body1 = exports2.contentType1 = exports2.blobSequenceNumber = exports2.blobContentLength = exports2.blobType = exports2.transactionalContentCrc64 = exports2.transactionalContentMD5 = exports2.tags = exports2.comp18 = exports2.comp17 = exports2.queryRequest = exports2.tier1 = exports2.comp16 = exports2.copyId = exports2.copyActionAbortConstant = exports2.comp15 = void 0; + var mappers_js_1 = require_mappers(); + exports2.contentType = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/xml", @@ -55771,11 +59008,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobServiceProperties = { + exports2.blobServiceProperties = { parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties + mapper: mappers_js_1.BlobServiceProperties }; - var accept = { + exports2.accept = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -55786,7 +59023,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url2 = { + exports2.url = { parameterPath: "url", mapper: { serializedName: "url", @@ -55798,7 +59035,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, skipEncoding: true }; - var restype = { + exports2.restype = { parameterPath: "restype", mapper: { defaultValue: "service", @@ -55809,7 +59046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp = { + exports2.comp = { parameterPath: "comp", mapper: { defaultValue: "properties", @@ -55820,7 +59057,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var timeoutInSeconds = { + exports2.timeoutInSeconds = { parameterPath: ["options", "timeoutInSeconds"], mapper: { constraints: { @@ -55833,10 +59070,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var version = { + exports2.version = { parameterPath: "version", mapper: { - defaultValue: "2024-11-04", + defaultValue: "2025-11-05", isConstant: true, serializedName: "x-ms-version", type: { @@ -55844,7 +59081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var requestId = { + exports2.requestId = { parameterPath: ["options", "requestId"], mapper: { serializedName: "x-ms-client-request-id", @@ -55854,7 +59091,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept1 = { + exports2.accept1 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -55865,7 +59102,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp1 = { + exports2.comp1 = { parameterPath: "comp", mapper: { defaultValue: "stats", @@ -55876,7 +59113,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp2 = { + exports2.comp2 = { parameterPath: "comp", mapper: { defaultValue: "list", @@ -55887,7 +59124,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prefix = { + exports2.prefix = { parameterPath: ["options", "prefix"], mapper: { serializedName: "prefix", @@ -55897,7 +59134,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var marker = { + exports2.marker = { parameterPath: ["options", "marker"], mapper: { serializedName: "marker", @@ -55907,7 +59144,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxPageSize = { + exports2.maxPageSize = { parameterPath: ["options", "maxPageSize"], mapper: { constraints: { @@ -55920,7 +59157,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include = { + exports2.include = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -55938,11 +59175,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var keyInfo = { + exports2.keyInfo = { parameterPath: "keyInfo", - mapper: KeyInfo + mapper: mappers_js_1.KeyInfo }; - var comp3 = { + exports2.comp3 = { parameterPath: "comp", mapper: { defaultValue: "userdelegationkey", @@ -55953,7 +59190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype1 = { + exports2.restype1 = { parameterPath: "restype", mapper: { defaultValue: "account", @@ -55964,7 +59201,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body = { + exports2.body = { parameterPath: "body", mapper: { serializedName: "body", @@ -55975,7 +59212,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp4 = { + exports2.comp4 = { parameterPath: "comp", mapper: { defaultValue: "batch", @@ -55986,7 +59223,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentLength = { + exports2.contentLength = { parameterPath: "contentLength", mapper: { serializedName: "Content-Length", @@ -55997,7 +59234,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var multipartContentType = { + exports2.multipartContentType = { parameterPath: "multipartContentType", mapper: { serializedName: "Content-Type", @@ -56008,7 +59245,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp5 = { + exports2.comp5 = { parameterPath: "comp", mapper: { defaultValue: "blobs", @@ -56019,7 +59256,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var where = { + exports2.where = { parameterPath: ["options", "where"], mapper: { serializedName: "where", @@ -56029,7 +59266,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var restype2 = { + exports2.restype2 = { parameterPath: "restype", mapper: { defaultValue: "container", @@ -56040,7 +59277,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var metadata = { + exports2.metadata = { parameterPath: ["options", "metadata"], mapper: { serializedName: "x-ms-meta", @@ -56052,7 +59289,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var access = { + exports2.access = { parameterPath: ["options", "access"], mapper: { serializedName: "x-ms-blob-public-access", @@ -56063,7 +59300,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var defaultEncryptionScope = { + exports2.defaultEncryptionScope = { parameterPath: [ "options", "containerEncryptionScope", @@ -56077,7 +59314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var preventEncryptionScopeOverride = { + exports2.preventEncryptionScopeOverride = { parameterPath: [ "options", "containerEncryptionScope", @@ -56091,7 +59328,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId = { + exports2.leaseId = { parameterPath: ["options", "leaseAccessConditions", "leaseId"], mapper: { serializedName: "x-ms-lease-id", @@ -56101,7 +59338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifModifiedSince = { + exports2.ifModifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], mapper: { serializedName: "If-Modified-Since", @@ -56111,7 +59348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifUnmodifiedSince = { + exports2.ifUnmodifiedSince = { parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], mapper: { serializedName: "If-Unmodified-Since", @@ -56121,7 +59358,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp6 = { + exports2.comp6 = { parameterPath: "comp", mapper: { defaultValue: "metadata", @@ -56132,7 +59369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp7 = { + exports2.comp7 = { parameterPath: "comp", mapper: { defaultValue: "acl", @@ -56143,7 +59380,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var containerAcl = { + exports2.containerAcl = { parameterPath: ["options", "containerAcl"], mapper: { serializedName: "containerAcl", @@ -56161,7 +59398,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp8 = { + exports2.comp8 = { parameterPath: "comp", mapper: { defaultValue: "undelete", @@ -56172,7 +59409,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerName = { + exports2.deletedContainerName = { parameterPath: ["options", "deletedContainerName"], mapper: { serializedName: "x-ms-deleted-container-name", @@ -56182,7 +59419,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deletedContainerVersion = { + exports2.deletedContainerVersion = { parameterPath: ["options", "deletedContainerVersion"], mapper: { serializedName: "x-ms-deleted-container-version", @@ -56192,7 +59429,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp9 = { + exports2.comp9 = { parameterPath: "comp", mapper: { defaultValue: "rename", @@ -56203,7 +59440,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContainerName = { + exports2.sourceContainerName = { parameterPath: "sourceContainerName", mapper: { serializedName: "x-ms-source-container-name", @@ -56214,7 +59451,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceLeaseId = { + exports2.sourceLeaseId = { parameterPath: ["options", "sourceLeaseId"], mapper: { serializedName: "x-ms-source-lease-id", @@ -56224,7 +59461,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp10 = { + exports2.comp10 = { parameterPath: "comp", mapper: { defaultValue: "lease", @@ -56235,7 +59472,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action = { + exports2.action = { parameterPath: "action", mapper: { defaultValue: "acquire", @@ -56246,7 +59483,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var duration = { + exports2.duration = { parameterPath: ["options", "duration"], mapper: { serializedName: "x-ms-lease-duration", @@ -56256,7 +59493,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId = { + exports2.proposedLeaseId = { parameterPath: ["options", "proposedLeaseId"], mapper: { serializedName: "x-ms-proposed-lease-id", @@ -56266,7 +59503,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action1 = { + exports2.action1 = { parameterPath: "action", mapper: { defaultValue: "release", @@ -56277,7 +59514,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var leaseId1 = { + exports2.leaseId1 = { parameterPath: "leaseId", mapper: { serializedName: "x-ms-lease-id", @@ -56288,7 +59525,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action2 = { + exports2.action2 = { parameterPath: "action", mapper: { defaultValue: "renew", @@ -56299,7 +59536,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action3 = { + exports2.action3 = { parameterPath: "action", mapper: { defaultValue: "break", @@ -56310,7 +59547,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var breakPeriod = { + exports2.breakPeriod = { parameterPath: ["options", "breakPeriod"], mapper: { serializedName: "x-ms-lease-break-period", @@ -56320,7 +59557,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var action4 = { + exports2.action4 = { parameterPath: "action", mapper: { defaultValue: "change", @@ -56331,7 +59568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var proposedLeaseId1 = { + exports2.proposedLeaseId1 = { parameterPath: "proposedLeaseId", mapper: { serializedName: "x-ms-proposed-lease-id", @@ -56342,7 +59579,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var include1 = { + exports2.include1 = { parameterPath: ["options", "include"], mapper: { serializedName: "include", @@ -56371,7 +59608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, collectionFormat: "CSV" }; - var delimiter = { + exports2.delimiter = { parameterPath: "delimiter", mapper: { serializedName: "delimiter", @@ -56382,7 +59619,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var snapshot = { + exports2.snapshot = { parameterPath: ["options", "snapshot"], mapper: { serializedName: "snapshot", @@ -56392,7 +59629,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var versionId = { + exports2.versionId = { parameterPath: ["options", "versionId"], mapper: { serializedName: "versionid", @@ -56402,7 +59639,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range = { + exports2.range = { parameterPath: ["options", "range"], mapper: { serializedName: "x-ms-range", @@ -56412,7 +59649,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentMD5 = { + exports2.rangeGetContentMD5 = { parameterPath: ["options", "rangeGetContentMD5"], mapper: { serializedName: "x-ms-range-get-content-md5", @@ -56422,7 +59659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rangeGetContentCRC64 = { + exports2.rangeGetContentCRC64 = { parameterPath: ["options", "rangeGetContentCRC64"], mapper: { serializedName: "x-ms-range-get-content-crc64", @@ -56432,7 +59669,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKey = { + exports2.encryptionKey = { parameterPath: ["options", "cpkInfo", "encryptionKey"], mapper: { serializedName: "x-ms-encryption-key", @@ -56442,7 +59679,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionKeySha256 = { + exports2.encryptionKeySha256 = { parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], mapper: { serializedName: "x-ms-encryption-key-sha256", @@ -56452,7 +59689,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionAlgorithm = { + exports2.encryptionAlgorithm = { parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], mapper: { serializedName: "x-ms-encryption-algorithm", @@ -56462,7 +59699,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifMatch = { + exports2.ifMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], mapper: { serializedName: "If-Match", @@ -56472,7 +59709,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifNoneMatch = { + exports2.ifNoneMatch = { parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], mapper: { serializedName: "If-None-Match", @@ -56482,7 +59719,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifTags = { + exports2.ifTags = { parameterPath: ["options", "modifiedAccessConditions", "ifTags"], mapper: { serializedName: "x-ms-if-tags", @@ -56492,7 +59729,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var deleteSnapshots = { + exports2.deleteSnapshots = { parameterPath: ["options", "deleteSnapshots"], mapper: { serializedName: "x-ms-delete-snapshots", @@ -56503,7 +59740,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobDeleteType = { + exports2.blobDeleteType = { parameterPath: ["options", "blobDeleteType"], mapper: { serializedName: "deletetype", @@ -56513,7 +59750,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp11 = { + exports2.comp11 = { parameterPath: "comp", mapper: { defaultValue: "expiry", @@ -56524,7 +59761,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiryOptions = { + exports2.expiryOptions = { parameterPath: "expiryOptions", mapper: { serializedName: "x-ms-expiry-option", @@ -56535,7 +59772,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var expiresOn = { + exports2.expiresOn = { parameterPath: ["options", "expiresOn"], mapper: { serializedName: "x-ms-expiry-time", @@ -56545,7 +59782,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobCacheControl = { + exports2.blobCacheControl = { parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], mapper: { serializedName: "x-ms-blob-cache-control", @@ -56555,7 +59792,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentType = { + exports2.blobContentType = { parameterPath: ["options", "blobHttpHeaders", "blobContentType"], mapper: { serializedName: "x-ms-blob-content-type", @@ -56565,7 +59802,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentMD5 = { + exports2.blobContentMD5 = { parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], mapper: { serializedName: "x-ms-blob-content-md5", @@ -56575,7 +59812,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentEncoding = { + exports2.blobContentEncoding = { parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], mapper: { serializedName: "x-ms-blob-content-encoding", @@ -56585,7 +59822,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLanguage = { + exports2.blobContentLanguage = { parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], mapper: { serializedName: "x-ms-blob-content-language", @@ -56595,7 +59832,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentDisposition = { + exports2.blobContentDisposition = { parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], mapper: { serializedName: "x-ms-blob-content-disposition", @@ -56605,7 +59842,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp12 = { + exports2.comp12 = { parameterPath: "comp", mapper: { defaultValue: "immutabilityPolicies", @@ -56616,7 +59853,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyExpiry = { + exports2.immutabilityPolicyExpiry = { parameterPath: ["options", "immutabilityPolicyExpiry"], mapper: { serializedName: "x-ms-immutability-policy-until-date", @@ -56626,7 +59863,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var immutabilityPolicyMode = { + exports2.immutabilityPolicyMode = { parameterPath: ["options", "immutabilityPolicyMode"], mapper: { serializedName: "x-ms-immutability-policy-mode", @@ -56637,7 +59874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp13 = { + exports2.comp13 = { parameterPath: "comp", mapper: { defaultValue: "legalhold", @@ -56648,7 +59885,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold = { + exports2.legalHold = { parameterPath: "legalHold", mapper: { serializedName: "x-ms-legal-hold", @@ -56659,7 +59896,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var encryptionScope = { + exports2.encryptionScope = { parameterPath: ["options", "encryptionScope"], mapper: { serializedName: "x-ms-encryption-scope", @@ -56669,7 +59906,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp14 = { + exports2.comp14 = { parameterPath: "comp", mapper: { defaultValue: "snapshot", @@ -56680,7 +59917,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier = { + exports2.tier = { parameterPath: ["options", "tier"], mapper: { serializedName: "x-ms-access-tier", @@ -56707,7 +59944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var rehydratePriority = { + exports2.rehydratePriority = { parameterPath: ["options", "rehydratePriority"], mapper: { serializedName: "x-ms-rehydrate-priority", @@ -56718,7 +59955,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfModifiedSince = { + exports2.sourceIfModifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56732,7 +59969,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfUnmodifiedSince = { + exports2.sourceIfUnmodifiedSince = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56746,7 +59983,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfMatch = { + exports2.sourceIfMatch = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], mapper: { serializedName: "x-ms-source-if-match", @@ -56756,7 +59993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfNoneMatch = { + exports2.sourceIfNoneMatch = { parameterPath: [ "options", "sourceModifiedAccessConditions", @@ -56770,7 +60007,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceIfTags = { + exports2.sourceIfTags = { parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], mapper: { serializedName: "x-ms-source-if-tags", @@ -56780,7 +60017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySource = { + exports2.copySource = { parameterPath: "copySource", mapper: { serializedName: "x-ms-copy-source", @@ -56791,7 +60028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobTagsString = { + exports2.blobTagsString = { parameterPath: ["options", "blobTagsString"], mapper: { serializedName: "x-ms-tags", @@ -56801,7 +60038,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sealBlob = { + exports2.sealBlob = { parameterPath: ["options", "sealBlob"], mapper: { serializedName: "x-ms-seal-blob", @@ -56811,7 +60048,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var legalHold1 = { + exports2.legalHold1 = { parameterPath: ["options", "legalHold"], mapper: { serializedName: "x-ms-legal-hold", @@ -56821,7 +60058,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var xMsRequiresSync = { + exports2.xMsRequiresSync = { parameterPath: "xMsRequiresSync", mapper: { defaultValue: "true", @@ -56832,7 +60069,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentMD5 = { + exports2.sourceContentMD5 = { parameterPath: ["options", "sourceContentMD5"], mapper: { serializedName: "x-ms-source-content-md5", @@ -56842,7 +60079,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceAuthorization = { + exports2.copySourceAuthorization = { parameterPath: ["options", "copySourceAuthorization"], mapper: { serializedName: "x-ms-copy-source-authorization", @@ -56852,7 +60089,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceTags = { + exports2.copySourceTags = { parameterPath: ["options", "copySourceTags"], mapper: { serializedName: "x-ms-copy-source-tag-option", @@ -56863,7 +60100,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp15 = { + exports2.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String" + } + } + }; + exports2.comp15 = { parameterPath: "comp", mapper: { defaultValue: "copy", @@ -56874,7 +60121,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyActionAbortConstant = { + exports2.copyActionAbortConstant = { parameterPath: "copyActionAbortConstant", mapper: { defaultValue: "abort", @@ -56885,7 +60132,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copyId = { + exports2.copyId = { parameterPath: "copyId", mapper: { serializedName: "copyid", @@ -56896,7 +60143,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp16 = { + exports2.comp16 = { parameterPath: "comp", mapper: { defaultValue: "tier", @@ -56907,7 +60154,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tier1 = { + exports2.tier1 = { parameterPath: "tier", mapper: { serializedName: "x-ms-access-tier", @@ -56935,11 +60182,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var queryRequest = { + exports2.queryRequest = { parameterPath: ["options", "queryRequest"], - mapper: QueryRequest + mapper: mappers_js_1.QueryRequest }; - var comp17 = { + exports2.comp17 = { parameterPath: "comp", mapper: { defaultValue: "query", @@ -56950,7 +60197,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp18 = { + exports2.comp18 = { parameterPath: "comp", mapper: { defaultValue: "tags", @@ -56961,11 +60208,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var tags = { + exports2.tags = { parameterPath: ["options", "tags"], - mapper: BlobTags + mapper: mappers_js_1.BlobTags }; - var transactionalContentMD5 = { + exports2.transactionalContentMD5 = { parameterPath: ["options", "transactionalContentMD5"], mapper: { serializedName: "Content-MD5", @@ -56975,7 +60222,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var transactionalContentCrc64 = { + exports2.transactionalContentCrc64 = { parameterPath: ["options", "transactionalContentCrc64"], mapper: { serializedName: "x-ms-content-crc64", @@ -56985,7 +60232,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType = { + exports2.blobType = { parameterPath: "blobType", mapper: { defaultValue: "PageBlob", @@ -56996,7 +60243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobContentLength = { + exports2.blobContentLength = { parameterPath: "blobContentLength", mapper: { serializedName: "x-ms-blob-content-length", @@ -57007,7 +60254,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobSequenceNumber = { + exports2.blobSequenceNumber = { parameterPath: ["options", "blobSequenceNumber"], mapper: { defaultValue: 0, @@ -57018,7 +60265,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var contentType1 = { + exports2.contentType1 = { parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/octet-stream", @@ -57029,7 +60276,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var body1 = { + exports2.body1 = { parameterPath: "body", mapper: { serializedName: "body", @@ -57040,7 +60287,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var accept2 = { + exports2.accept2 = { parameterPath: "accept", mapper: { defaultValue: "application/xml", @@ -57051,7 +60298,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp19 = { + exports2.comp19 = { parameterPath: "comp", mapper: { defaultValue: "page", @@ -57062,7 +60309,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite = { + exports2.pageWrite = { parameterPath: "pageWrite", mapper: { defaultValue: "update", @@ -57073,7 +60320,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThanOrEqualTo = { + exports2.ifSequenceNumberLessThanOrEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57087,7 +60334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberLessThan = { + exports2.ifSequenceNumberLessThan = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57101,7 +60348,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var ifSequenceNumberEqualTo = { + exports2.ifSequenceNumberEqualTo = { parameterPath: [ "options", "sequenceNumberAccessConditions", @@ -57115,7 +60362,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var pageWrite1 = { + exports2.pageWrite1 = { parameterPath: "pageWrite", mapper: { defaultValue: "clear", @@ -57126,7 +60373,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceUrl = { + exports2.sourceUrl = { parameterPath: "sourceUrl", mapper: { serializedName: "x-ms-copy-source", @@ -57137,7 +60384,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange = { + exports2.sourceRange = { parameterPath: "sourceRange", mapper: { serializedName: "x-ms-source-range", @@ -57148,7 +60395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceContentCrc64 = { + exports2.sourceContentCrc64 = { parameterPath: ["options", "sourceContentCrc64"], mapper: { serializedName: "x-ms-source-content-crc64", @@ -57158,7 +60405,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var range1 = { + exports2.range1 = { parameterPath: "range", mapper: { serializedName: "x-ms-range", @@ -57169,7 +60416,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp20 = { + exports2.comp20 = { parameterPath: "comp", mapper: { defaultValue: "pagelist", @@ -57180,7 +60427,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevsnapshot = { + exports2.prevsnapshot = { parameterPath: ["options", "prevsnapshot"], mapper: { serializedName: "prevsnapshot", @@ -57190,7 +60437,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var prevSnapshotUrl = { + exports2.prevSnapshotUrl = { parameterPath: ["options", "prevSnapshotUrl"], mapper: { serializedName: "x-ms-previous-snapshot-url", @@ -57200,7 +60447,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sequenceNumberAction = { + exports2.sequenceNumberAction = { parameterPath: "sequenceNumberAction", mapper: { serializedName: "x-ms-sequence-number-action", @@ -57212,7 +60459,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp21 = { + exports2.comp21 = { parameterPath: "comp", mapper: { defaultValue: "incrementalcopy", @@ -57223,7 +60470,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType1 = { + exports2.blobType1 = { parameterPath: "blobType", mapper: { defaultValue: "AppendBlob", @@ -57234,7 +60481,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp22 = { + exports2.comp22 = { parameterPath: "comp", mapper: { defaultValue: "appendblock", @@ -57245,7 +60492,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var maxSize = { + exports2.maxSize = { parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], mapper: { serializedName: "x-ms-blob-condition-maxsize", @@ -57255,7 +60502,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var appendPosition = { + exports2.appendPosition = { parameterPath: [ "options", "appendPositionAccessConditions", @@ -57269,7 +60516,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var sourceRange1 = { + exports2.sourceRange1 = { parameterPath: ["options", "sourceRange"], mapper: { serializedName: "x-ms-source-range", @@ -57279,7 +60526,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp23 = { + exports2.comp23 = { parameterPath: "comp", mapper: { defaultValue: "seal", @@ -57290,7 +60537,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blobType2 = { + exports2.blobType2 = { parameterPath: "blobType", mapper: { defaultValue: "BlockBlob", @@ -57301,7 +60548,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var copySourceBlobProperties = { + exports2.copySourceBlobProperties = { parameterPath: ["options", "copySourceBlobProperties"], mapper: { serializedName: "x-ms-copy-source-blob-properties", @@ -57311,7 +60558,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var comp24 = { + exports2.comp24 = { parameterPath: "comp", mapper: { defaultValue: "block", @@ -57322,7 +60569,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blockId = { + exports2.blockId = { parameterPath: "blockId", mapper: { serializedName: "blockid", @@ -57333,11 +60580,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var blocks = { + exports2.blocks = { parameterPath: "blocks", - mapper: BlockLookupList + mapper: mappers_js_1.BlockLookupList }; - var comp25 = { + exports2.comp25 = { parameterPath: "comp", mapper: { defaultValue: "blocklist", @@ -57348,7 +60595,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var listType = { + exports2.listType = { parameterPath: "listType", mapper: { defaultValue: "committed", @@ -57361,7 +60608,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js +var require_service = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ServiceImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ServiceImpl = class { + client; /** * Initialize a new instance of the class Service class. * @param client Reference to the service client @@ -57375,8 +60636,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobServiceProperties The StorageService properties. * @param options The options parameters. */ - setProperties(blobServiceProperties2, options) { - return this.client.sendOperationRequest({ blobServiceProperties: blobServiceProperties2, options }, setPropertiesOperationSpec); + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } /** * gets the properties of a storage account's Blob service, including properties for Storage Analytics @@ -57384,7 +60645,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * Retrieves statistics related to replication for the Blob service. It is only available on the @@ -57408,15 +60669,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param keyInfo Key information * @param options The options parameters. */ - getUserDelegationKey(keyInfo2, options) { - return this.client.sendOperationRequest({ keyInfo: keyInfo2, options }, getUserDelegationKeyOperationSpec); + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -57426,8 +60687,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec$1); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a @@ -57436,10 +60697,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } }; - var xmlSerializer$5 = coreClient__namespace.createSerializer( + exports2.ServiceImpl = ServiceImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -57449,173 +60711,173 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 202: { - headersMapper: ServiceSetPropertiesHeaders + headersMapper: Mappers.ServiceSetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders } }, - requestBody: blobServiceProperties, + requestBody: Parameters.blobServiceProperties, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$2 = { + var getPropertiesOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders } }, queryParameters: [ - restype, - comp, - timeoutInSeconds + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getStatisticsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders } }, queryParameters: [ - restype, - timeoutInSeconds, - comp1 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var listContainersSegmentOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; var getUserDelegationKeyOperationSpec = { path: "/", httpMethod: "POST", responses: { 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders } }, - requestBody: keyInfo, + requestBody: Parameters.keyInfo, queryParameters: [ - restype, - timeoutInSeconds, - comp3 + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$2 = { + var getAccountInfoOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - headersMapper: ServiceGetAccountInfoHeaders + headersMapper: Mappers.ServiceGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var submitBatchOperationSpec$1 = { + var submitBatchOperationSpec = { path: "/", httpMethod: "POST", responses: { @@ -57624,58 +60886,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ServiceSubmitBatchHeaders + headersMapper: Mappers.ServiceSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders } }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url2], + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$5 + serializer: xmlSerializer }; - var filterBlobsOperationSpec$1 = { + var filterBlobsOperationSpec = { path: "/", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$5 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js +var require_container = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var ContainerImpl = class { + client; /** * Initialize a new instance of the class Container class. * @param client Reference to the service client @@ -57689,7 +60965,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** * returns all user-defined metadata and system properties for the specified container. The data @@ -57697,7 +60973,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } /** * operation marks the specified container for deletion. The container and any blobs contained within @@ -57705,14 +60981,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } /** * operation sets one or more user-defined name-value pairs for the specified container. * @param options The options parameters. */ setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } /** * gets the permissions for the specified container. The permissions indicate whether container data @@ -57742,8 +61018,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceContainerName Required. Specifies the name of the container to rename. * @param options The options parameters. */ - rename(sourceContainerName2, options) { - return this.client.sendOperationRequest({ sourceContainerName: sourceContainerName2, options }, renameOperationSpec); + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } /** * The Batch operation allows multiple API calls to be embedded into a single HTTP request. @@ -57753,8 +61029,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - submitBatch(contentLength2, multipartContentType2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, multipartContentType: multipartContentType2, body: body2, options }, submitBatchOperationSpec); + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } /** * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given @@ -57770,7 +61046,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57778,8 +61054,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec$1); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57787,8 +61063,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec$1); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57796,7 +61072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options The options parameters. */ breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } /** * [Update] establishes and manages a lock on a container for delete operations. The lock duration can @@ -57807,8 +61083,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec$1); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The List Blobs operation returns a list of the blobs under the specified container @@ -57825,124 +61101,125 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * character or a string. * @param options The options parameters. */ - listBlobHierarchySegment(delimiter2, options) { - return this.client.sendOperationRequest({ delimiter: delimiter2, options }, listBlobHierarchySegmentOperationSpec); + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } /** * Returns the sku name and account kind * @param options The options parameters. */ getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } }; - var xmlSerializer$4 = coreClient__namespace.createSerializer( + exports2.ContainerImpl = ContainerImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$2 = { + var createOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerCreateHeaders + headersMapper: Mappers.ContainerCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getPropertiesOperationSpec$1 = { + var getPropertiesOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetPropertiesHeaders + headersMapper: Mappers.ContainerGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var deleteOperationSpec$1 = { + var deleteOperationSpec = { path: "/{containerName}", httpMethod: "DELETE", responses: { 202: { - headersMapper: ContainerDeleteHeaders + headersMapper: Mappers.ContainerDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var setMetadataOperationSpec$1 = { + var setMetadataOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetMetadataHeaders + headersMapper: Mappers.ContainerSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp6 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var getAccessPolicyOperationSpec = { path: "/{containerName}", @@ -57961,117 +61238,117 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; xmlIsWrapped: true, xmlElementName: "SignedIdentifier" }, - headersMapper: ContainerGetAccessPolicyHeaders + headersMapper: Mappers.ContainerGetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var setAccessPolicyOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerSetAccessPolicyHeaders + headersMapper: Mappers.ContainerSetAccessPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders } }, - requestBody: containerAcl, + requestBody: Parameters.containerAcl, queryParameters: [ - timeoutInSeconds, - restype2, - comp7 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var restoreOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerRestoreHeaders + headersMapper: Mappers.ContainerRestoreHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp8 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var renameOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenameHeaders + headersMapper: Mappers.ContainerRenameHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp9 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var submitBatchOperationSpec = { path: "/{containerName}", @@ -58082,304 +61359,318 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: ContainerSubmitBatchHeaders + headersMapper: Mappers.ContainerSubmitBatchHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders } }, - requestBody: body, + requestBody: Parameters.body, queryParameters: [ - timeoutInSeconds, - comp4, - restype2 + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var filterBlobsOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var acquireLeaseOperationSpec$1 = { + var acquireLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 201: { - headersMapper: ContainerAcquireLeaseHeaders + headersMapper: Mappers.ContainerAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var releaseLeaseOperationSpec$1 = { + var releaseLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerReleaseLeaseHeaders + headersMapper: Mappers.ContainerReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var renewLeaseOperationSpec$1 = { + var renewLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerRenewLeaseHeaders + headersMapper: Mappers.ContainerRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var breakLeaseOperationSpec$1 = { + var breakLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 202: { - headersMapper: ContainerBreakLeaseHeaders + headersMapper: Mappers.ContainerBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var changeLeaseOperationSpec$1 = { + var changeLeaseOperationSpec = { path: "/{containerName}", httpMethod: "PUT", responses: { 200: { - headersMapper: ContainerChangeLeaseHeaders + headersMapper: Mappers.ContainerChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - restype2, - comp10 + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobFlatSegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1 + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; var listBlobHierarchySegmentOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; - var getAccountInfoOperationSpec$1 = { + var getAccountInfoOperationSpec = { path: "/{containerName}", httpMethod: "GET", responses: { 200: { - headersMapper: ContainerGetAccountInfoHeaders + headersMapper: Mappers.ContainerGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$4 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js +var require_blob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlobImpl = class { + client; /** * Initialize a new instance of the class Blob class. * @param client Reference to the service client @@ -58433,8 +61724,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param expiryOptions Required. Indicates mode of the expiry time * @param options The options parameters. */ - setExpiry(expiryOptions2, options) { - return this.client.sendOperationRequest({ expiryOptions: expiryOptions2, options }, setExpiryOperationSpec); + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } /** * The Set HTTP Headers operation sets system properties on the blob @@ -58462,8 +61753,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param legalHold Specified if a legal hold should be set on the blob. * @param options The options parameters. */ - setLegalHold(legalHold2, options) { - return this.client.sendOperationRequest({ legalHold: legalHold2, options }, setLegalHoldOperationSpec); + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } /** * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more @@ -58487,8 +61778,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - releaseLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, releaseLeaseOperationSpec); + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58496,8 +61787,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param leaseId Specifies the current lease ID on the resource. * @param options The options parameters. */ - renewLease(leaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, options }, renewLeaseOperationSpec); + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58508,8 +61799,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * (String) for a list of valid GUID string formats. * @param options The options parameters. */ - changeLease(leaseId2, proposedLeaseId2, options) { - return this.client.sendOperationRequest({ leaseId: leaseId2, proposedLeaseId: proposedLeaseId2, options }, changeLeaseOperationSpec); + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } /** * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete @@ -58534,8 +61825,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - startCopyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, startCopyFromURLOperationSpec); + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } /** * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return @@ -58546,8 +61837,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyFromURL(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyFromURLOperationSpec); + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } /** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination @@ -58556,8 +61847,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The options parameters. */ - abortCopyFromURL(copyId2, options) { - return this.client.sendOperationRequest({ copyId: copyId2, options }, abortCopyFromURLOperationSpec); + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } /** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium @@ -58568,8 +61859,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tier Indicates the tier to be set on the blob. * @param options The options parameters. */ - setTier(tier2, options) { - return this.client.sendOperationRequest({ tier: tier2, options }, setTierOperationSpec); + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } /** * Returns the sku name and account kind @@ -58601,7 +61892,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } }; - var xmlSerializer$3 = coreClient__namespace.createSerializer( + exports2.BlobImpl = BlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -58615,651 +61907,667 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobDownloadHeaders + headersMapper: Mappers.BlobDownloadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getPropertiesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "HEAD", responses: { 200: { - headersMapper: BlobGetPropertiesHeaders + headersMapper: Mappers.BlobGetPropertiesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 202: { - headersMapper: BlobDeleteHeaders + headersMapper: Mappers.BlobDeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var undeleteOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobUndeleteHeaders + headersMapper: Mappers.BlobUndeleteHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setExpiryOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetExpiryHeaders + headersMapper: Mappers.BlobSetExpiryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setHttpHeadersOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetHttpHeadersHeaders + headersMapper: Mappers.BlobSetHttpHeadersHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var deleteImmutabilityPolicyOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "DELETE", responses: { 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setLegalHoldOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetLegalHoldHeaders + headersMapper: Mappers.BlobSetLegalHoldHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url2], + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13 + ], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - legalHold + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setMetadataOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetMetadataHeaders + headersMapper: Mappers.BlobSetMetadataHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var acquireLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobAcquireLeaseHeaders + headersMapper: Mappers.BlobAcquireLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var releaseLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobReleaseLeaseHeaders + headersMapper: Mappers.BlobReleaseLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var renewLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobRenewLeaseHeaders + headersMapper: Mappers.BlobRenewLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var changeLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobChangeLeaseHeaders + headersMapper: Mappers.BlobChangeLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var breakLeaseOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobBreakLeaseHeaders + headersMapper: Mappers.BlobBreakLeaseHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var createSnapshotOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: BlobCreateSnapshotHeaders + headersMapper: Mappers.BlobCreateSnapshotHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var startCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobStartCopyFromURLHeaders + headersMapper: Mappers.BlobStartCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var copyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: BlobCopyFromURLHeaders + headersMapper: Mappers.BlobCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var abortCopyFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobAbortCopyFromURLHeaders + headersMapper: Mappers.BlobAbortCopyFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp15, - copyId + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTierOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, 202: { - headersMapper: BlobSetTierHeaders + headersMapper: Mappers.BlobSetTierHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getAccountInfoOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - headersMapper: BlobGetAccountInfoHeaders + headersMapper: Mappers.BlobGetAccountInfoHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders } }, queryParameters: [ - comp, - timeoutInSeconds, - restype1 + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1 + Parameters.version, + Parameters.requestId, + Parameters.accept1 ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var queryOperationSpec = { path: "/{containerName}/{blob}", @@ -59270,112 +62578,126 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, 206: { bodyMapper: { type: { name: "Stream" }, serializedName: "parsedResponse" }, - headersMapper: BlobQueryHeaders + headersMapper: Mappers.BlobQueryHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders } }, - requestBody: queryRequest, + requestBody: Parameters.queryRequest, queryParameters: [ - timeoutInSeconds, - snapshot, - comp17 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var getTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$3 + serializer: xmlSerializer }; var setTagsOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 204: { - headersMapper: BlobSetTagsHeaders + headersMapper: Mappers.BlobSetTagsHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders } }, - requestBody: tags, + requestBody: Parameters.tags, queryParameters: [ - timeoutInSeconds, - versionId, - comp18 + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "xml", - serializer: xmlSerializer$3 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js +var require_pageBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var PageBlobImpl = class { + client; /** * Initialize a new instance of the class PageBlob class. * @param client Reference to the service client @@ -59390,8 +62712,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - create(contentLength2, blobContentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, blobContentLength: blobContentLength2, options }, createOperationSpec$1); + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob @@ -59399,16 +62721,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - uploadPages(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadPagesOperationSpec); + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } /** * The Clear Pages operation clears a set of pages from a page blob * @param contentLength The length of the request. * @param options The options parameters. */ - clearPages(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, clearPagesOperationSpec); + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } /** * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a @@ -59421,8 +62743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * aligned and range-end is required. * @param options The options parameters. */ - uploadPagesFromURL(sourceUrl2, sourceRange2, contentLength2, range2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, sourceRange: sourceRange2, contentLength: contentLength2, range: range2, options }, uploadPagesFromURLOperationSpec); + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } /** * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a @@ -59446,8 +62768,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * page blob size must be aligned to a 512-byte boundary. * @param options The options parameters. */ - resize(blobContentLength2, options) { - return this.client.sendOperationRequest({ blobContentLength: blobContentLength2, options }, resizeOperationSpec); + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } /** * Update the sequence number of the blob @@ -59456,8 +62778,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blob's sequence number * @param options The options parameters. */ - updateSequenceNumber(sequenceNumberAction2, options) { - return this.client.sendOperationRequest({ sequenceNumberAction: sequenceNumberAction2, options }, updateSequenceNumberOperationSpec); + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } /** * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. @@ -59471,358 +62793,374 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - copyIncremental(copySource2, options) { - return this.client.sendOperationRequest({ copySource: copySource2, options }, copyIncrementalOperationSpec); + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } }; - var xmlSerializer$2 = coreClient__namespace.createSerializer( + exports2.PageBlobImpl = PageBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true ); - var createOperationSpec$1 = { + var createOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobCreateHeaders + headersMapper: Mappers.PageBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesHeaders + headersMapper: Mappers.PageBlobUploadPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var clearPagesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobClearPagesHeaders + headersMapper: Mappers.PageBlobClearPagesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var uploadPagesFromURLOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1 ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20 + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20 ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var getPageRangesDiffOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "GET", responses: { 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var resizeOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobResizeHeaders + headersMapper: Mappers.PageBlobResizeHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var updateSequenceNumberOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders } }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; var copyIncrementalOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 202: { - headersMapper: PageBlobCopyIncrementalHeaders + headersMapper: Mappers.PageBlobCopyIncrementalHeaders }, default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource ], isXML: true, - serializer: xmlSerializer$2 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js +var require_appendBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppendBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var AppendBlobImpl = class { + client; /** * Initialize a new instance of the class AppendBlob class. * @param client Reference to the service client @@ -59835,8 +63173,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - create(contentLength2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, options }, createOperationSpec); + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob. The @@ -59846,8 +63184,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - appendBlock(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, appendBlockOperationSpec); + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } /** * The Append Block operation commits a new block of data to the end of an existing append blob where @@ -59858,8 +63196,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param contentLength The length of the request. * @param options The options parameters. */ - appendBlockFromUrl(sourceUrl2, contentLength2, options) { - return this.client.sendOperationRequest({ sourceUrl: sourceUrl2, contentLength: contentLength2, options }, appendBlockFromUrlOperationSpec); + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); } /** * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version @@ -59870,7 +63208,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.client.sendOperationRequest({ options }, sealOperationSpec); } }; - var xmlSerializer$1 = coreClient__namespace.createSerializer( + exports2.AppendBlobImpl = AppendBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -59880,161 +63219,176 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobCreateHeaders + headersMapper: Mappers.AppendBlobCreateHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockHeaders + headersMapper: Mappers.AppendBlobAppendBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition ], isXML: true, contentType: "application/xml; charset=utf-8", mediaType: "binary", - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var appendBlockFromUrlOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1 ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; var sealOperationSpec = { path: "/{containerName}/{blob}", httpMethod: "PUT", responses: { 200: { - headersMapper: AppendBlobSealHeaders + headersMapper: Mappers.AppendBlobSealHeaders }, default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders } }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition ], isXML: true, - serializer: xmlSerializer$1 + serializer: xmlSerializer }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js +var require_blockBlob = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlockBlobImpl = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreClient = tslib_1.__importStar(require_commonjs8()); + var Mappers = tslib_1.__importStar(require_mappers()); + var Parameters = tslib_1.__importStar(require_parameters()); var BlockBlobImpl = class { + client; /** * Initialize a new instance of the class BlockBlob class. * @param client Reference to the service client @@ -60051,8 +63405,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - upload(contentLength2, body2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, body: body2, options }, uploadOperationSpec); + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } /** * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read @@ -60067,8 +63421,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * access signature. * @param options The options parameters. */ - putBlobFromUrl(contentLength2, copySource2, options) { - return this.client.sendOperationRequest({ contentLength: contentLength2, copySource: copySource2, options }, putBlobFromUrlOperationSpec); + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob @@ -60079,8 +63433,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param body Initial data * @param options The options parameters. */ - stageBlock(blockId2, contentLength2, body2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, body: body2, options }, stageBlockOperationSpec); + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } /** * The Stage Block operation creates a new block to be committed as part of a blob where the contents @@ -60092,8 +63446,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param sourceUrl Specify a URL to the copy source. * @param options The options parameters. */ - stageBlockFromURL(blockId2, contentLength2, sourceUrl2, options) { - return this.client.sendOperationRequest({ blockId: blockId2, contentLength: contentLength2, sourceUrl: sourceUrl2, options }, stageBlockFromURLOperationSpec); + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } /** * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the @@ -60106,8 +63460,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blocks Blob Blocks. * @param options The options parameters. */ - commitBlockList(blocks2, options) { - return this.client.sendOperationRequest({ blocks: blocks2, options }, commitBlockListOperationSpec); + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } /** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block @@ -60116,11 +63470,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * blocks, or both lists together. * @param options The options parameters. */ - getBlockList(listType2, options) { - return this.client.sendOperationRequest({ listType: listType2, options }, getBlockListOperationSpec); + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } }; - var xmlSerializer = coreClient__namespace.createSerializer( + exports2.BlockBlobImpl = BlockBlobImpl; + var xmlSerializer = coreClient.createSerializer( Mappers, /* isXml */ true @@ -60130,47 +63485,47 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobUploadHeaders + headersMapper: Mappers.BlockBlobUploadHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders } }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60182,51 +63537,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders } }, - queryParameters: [timeoutInSeconds], - urlParameters: [url2], + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties ], isXML: true, serializer: xmlSerializer @@ -60236,33 +63592,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockHeaders + headersMapper: Mappers.BlockBlobStageBlockHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders } }, - requestBody: body1, + requestBody: Parameters.body1, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2 + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60274,38 +63630,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - comp24, - blockId + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1 + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1 ], isXML: true, serializer: xmlSerializer @@ -60315,45 +63672,45 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "PUT", responses: { 201: { - headersMapper: BlockBlobCommitBlockListHeaders + headersMapper: Mappers.BlockBlobCommitBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders } }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url2], + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64 + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64 ], isXML: true, contentType: "application/xml; charset=utf-8", @@ -60365,41 +63722,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; httpMethod: "GET", responses: { 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders }, default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders } }, queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType ], - urlParameters: [url2], + urlParameters: [Parameters.url], headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags ], isXML: true, serializer: xmlSerializer }; - var StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js +var require_operations = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operations/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service(), exports2); + tslib_1.__exportStar(require_container(), exports2); + tslib_1.__exportStar(require_blob(), exports2); + tslib_1.__exportStar(require_pageBlob(), exports2); + tslib_1.__exportStar(require_appendBlob(), exports2); + tslib_1.__exportStar(require_blockBlob(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js +var require_storageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/storageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var coreHttpCompat = tslib_1.__importStar(require_commonjs9()); + var index_js_1 = require_operations(); + var StorageClient = class extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** * Initializes a new instance of the StorageClient class. * @param url The URL of the service account, container, or blob that is the target of the desired * operation. * @param options The parameter options */ - constructor(url3, options) { - var _a, _b; - if (url3 === void 0) { + constructor(url2, options) { + if (url2 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -60408,67 +63793,212 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const defaults = { requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-azure-storage-blob/12.25.0`; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}" + }; super(optionsWithDefaults); - this.url = url3; - this.version = options.version || "2024-11-04"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); + this.url = url2; + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; }; - var StorageContextClient = class extends StorageClient$1 { + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js +var require_service2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/service.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js +var require_container2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/container.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js +var require_blob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js +var require_pageBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/pageBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js +var require_appendBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/appendBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js +var require_blockBlob2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/blockBlob.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js +var require_operationsInterfaces = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/operationsInterfaces/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_service2(), exports2); + tslib_1.__exportStar(require_container2(), exports2); + tslib_1.__exportStar(require_blob2(), exports2); + tslib_1.__exportStar(require_pageBlob2(), exports2); + tslib_1.__exportStar(require_appendBlob2(), exports2); + tslib_1.__exportStar(require_blockBlob2(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js +var require_src2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generated/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_models(), exports2); + var storageClient_js_1 = require_storageClient(); + Object.defineProperty(exports2, "StorageClient", { enumerable: true, get: function() { + return storageClient_js_1.StorageClient; + } }); + tslib_1.__exportStar(require_operationsInterfaces(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js +var require_StorageContextClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageContextClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageContextClient = void 0; + var index_js_1 = require_src2(); + var StorageContextClient = class extends index_js_1.StorageClient { async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); + const operationSpecToSend = { ...operationSpec }; if (operationSpecToSend.path === "/{containerName}" || operationSpecToSend.path === "/{containerName}/{blob}") { operationSpecToSend.path = ""; } return super.sendOperationRequest(operationArguments, operationSpecToSend); } }; + exports2.StorageContextClient = StorageContextClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js +var require_StorageClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/StorageClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageClient = void 0; + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var StorageClient = class { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; /** * Creates an instance of StorageClient. * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url3, pipeline) { - this.url = escapeURLPath(url3); - this.accountName = getAccountNameFromUrl(url3); + constructor(url2, pipeline) { + this.url = (0, utils_common_js_1.escapeURLPath)(url2); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url2); this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); const storageClientContext = this.storageClientContext; storageClientContext.requestContentType = void 0; } }; - var tracingClient = coreTracing.createTracingClient({ + exports2.StorageClient = StorageClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js +var require_tracing = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/tracing.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tracingClient = void 0; + var core_tracing_1 = require_commonjs5(); + var constants_js_1 = require_constants10(); + exports2.tracingClient = (0, core_tracing_1.createTracingClient)({ packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, + packageVersion: constants_js_1.SDK_VERSION, namespace: "Microsoft.Storage" }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js +var require_BlobSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobSASPermissions = void 0; var BlobSASPermissions = class _BlobSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -60561,6 +64091,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return blobSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. @@ -60605,22 +64179,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.BlobSASPermissions = BlobSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js +var require_ContainerSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/ContainerSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerSASPermissions = void 0; var ContainerSASPermissions = class _ContainerSASPermissions { - constructor() { - this.read = false; - this.add = false; - this.create = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.tag = false; - this.move = false; - this.execute = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - this.filterByTags = false; - } /** * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an * Error if it encounters a character that does not correspond to a valid permission. @@ -60725,12 +64294,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return containerSASPermissions; } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specifies List access granted. + */ + list = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; /** * Converts the given permissions to a string. Using this method will guarantee the permissions are in an * order accepted by the service. * * The order of the characters should be as specified here to ensure correctness. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * */ toString() { @@ -60777,7 +64398,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.ContainerSASPermissions = ContainerSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js +var require_UserDelegationKeyCredential = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/credentials/UserDelegationKeyCredential.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UserDelegationKeyCredential = void 0; + var node_crypto_1 = require("node:crypto"); var UserDelegationKeyCredential = class { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; /** * Creates an instance of UserDelegationKeyCredential. * @param accountName - @@ -60794,18 +64438,156 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stringToSign - */ computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } }; + exports2.UserDelegationKeyCredential = UserDelegationKeyCredential; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js +var require_SasIPRange = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SasIPRange.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ipRangeToString = ipRangeToString; function ipRangeToString(ipRange) { return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } - exports2.SASProtocol = void 0; - (function(SASProtocol) { - SASProtocol["Https"] = "https"; - SASProtocol["HttpsAndHttp"] = "https,http"; - })(exports2.SASProtocol || (exports2.SASProtocol = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js +var require_SASQueryParameters = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/SASQueryParameters.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SASQueryParameters = exports2.SASProtocol = void 0; + var SasIPRange_js_1 = require_SasIPRange(); + var utils_common_js_1 = require_utils_common(); + var SASProtocol; + (function(SASProtocol2) { + SASProtocol2["Https"] = "https"; + SASProtocol2["HttpsAndHttp"] = "https,http"; + })(SASProtocol || (exports2.SASProtocol = SASProtocol = {})); var SASQueryParameters = class { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; /** * Optional. IP range allowed for this SAS. * @@ -60820,8 +64602,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return void 0; } - constructor(version2, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn2, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType2, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope2) { - this.version = version2; + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; this.signature = signature; if (permissionsOrOptions !== void 0 && typeof permissionsOrOptions !== "string") { this.permissions = permissionsOrOptions.permissions; @@ -60852,19 +64634,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { this.services = services; this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn2; + this.expiresOn = expiresOn; this.permissions = permissionsOrOptions; this.protocol = protocol; this.startsOn = startsOn; this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope2; + this.encryptionScope = encryptionScope; this.identifier = identifier; this.resource = resource; this.cacheControl = cacheControl; this.contentDisposition = contentDisposition; this.contentEncoding = contentEncoding; this.contentLanguage = contentLanguage; - this.contentType = contentType2; + this.contentType = contentType; if (userDelegationKey) { this.signedOid = userDelegationKey.signedObjectId; this.signedTenantId = userDelegationKey.signedTenantId; @@ -60931,13 +64713,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.protocol); break; case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : void 0); break; case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : void 0); break; case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : void 0); + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : void 0); break; case "si": this.tryAppendQueryParameter(queries, param, this.identifier); @@ -60952,10 +64734,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.tryAppendQueryParameter(queries, param, this.signedTenantId); break; case "skt": - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : void 0); break; case "ske": - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : void 0); + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : void 0); break; case "sks": this.tryAppendQueryParameter(queries, param, this.signedService); @@ -61015,38 +64797,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.SASQueryParameters = SASQueryParameters; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js +var require_BlobSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/BlobSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; + exports2.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; + var BlobSASPermissions_js_1 = require_BlobSASPermissions(); + var ContainerSASPermissions_js_1 = require_ContainerSASPermissions(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var UserDelegationKeyCredential_js_1 = require_UserDelegationKeyCredential(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential ? sharedKeyCredentialOrUserDelegationKey : void 0; let userDelegationKeyCredential; if (sharedKeyCredential === void 0 && accountName !== void 0) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } if (sharedKeyCredential === void 0 && userDelegationKeyCredential === void 0) { throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } } } - if (version2 >= "2018-11-09") { + if (version >= "2018-11-09") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); } else { - if (version2 >= "2020-02-10") { + if (version >= "2020-02-10") { return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } } - if (version2 >= "2015-04-05") { + if (version >= "2015-04-05") { if (sharedKeyCredential !== void 0) { return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); } else { @@ -61067,18 +64872,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", @@ -61089,7 +64894,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -61112,18 +64917,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61136,7 +64941,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), stringToSign }; } @@ -61159,18 +64964,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61184,7 +64989,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, void 0, void 0, void 0, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -61207,23 +65012,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61236,7 +65041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), stringToSign }; } @@ -61259,27 +65064,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61292,7 +65097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), stringToSign }; } @@ -61315,27 +65120,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; let verifiedPermissions; if (blobSASSignatureValues.permissions) { if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } const stringToSign = [ verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) : "", - blobSASSignatureValues.expiresOn ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), userDelegationKeyCredential.userDelegationKey.signedObjectId, userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", userDelegationKeyCredential.userDelegationKey.signedService, userDelegationKeyCredential.userDelegationKey.signedVersion, blobSASSignatureValues.preauthorizedAgentObjectId, void 0, // agentObjectId blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", blobSASSignatureValues.version, resource, @@ -61349,7 +65154,68 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ].join("\n"); const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign + }; + } + function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp2 = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp2 = blobSASSignatureValues.versionId; + } + } + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) : "", + blobSASSignatureValues.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + void 0, + // agentObjectId + blobSASSignatureValues.correlationId, + void 0, + // SignedKeyDelegatedUserTenantId, will be added in a future release. + void 0, + // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp2, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, void 0, void 0, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), stringToSign }; } @@ -61361,47 +65227,64 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return elements.join(""); } function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version2 = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version2 < "2018-11-09") { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.snapshotTime) { throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } - if (blobSASSignatureValues.versionId && version2 < "2019-10-10") { + if (blobSASSignatureValues.versionId && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } if (blobSASSignatureValues.blobName === void 0 && blobSASSignatureValues.versionId) { throw RangeError("Must provide 'blobName' when providing 'versionId'."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); } - if (version2 < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + if (version < "2020-02-10" && blobSASSignatureValues.permissions && (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); } - if (version2 < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { + if (version < "2021-04-10" && blobSASSignatureValues.permissions && blobSASSignatureValues.permissions.filterByTags) { throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); } - if (version2 < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + if (version < "2020-02-10" && (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); } - if (blobSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - blobSASSignatureValues.version = version2; + blobSASSignatureValues.version = version; return blobSASSignatureValues; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js +var require_BlobLeaseClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobLeaseClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobLeaseClient = void 0; + var core_util_1 = require_commonjs4(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); var BlobLeaseClient = class { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** * Gets the lease Id. * @@ -61423,7 +65306,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param client - The client to make the lease operation requests. * @param leaseId - Initial proposed lease id. */ - constructor(client, leaseId2) { + constructor(client, leaseId) { const clientContext = client.storageClientContext; this._url = client.url; if (client.name === void 0) { @@ -61433,34 +65316,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._isContainer = false; this._containerOrBlobOperation = clientContext.blob; } - if (!leaseId2) { - leaseId2 = coreUtil.randomUUID(); + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - this._leaseId = leaseId2; + this._leaseId = leaseId; } /** * Establishes and manages a lock on a container for delete operations, or on a blob * for write and delete operations. * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param duration - Must be between 15 to 60 seconds, or infinite (-1) * @param options - option to configure lease management operations. * @returns Response data for acquire lease operation. */ - async acquireLease(duration2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async acquireLease(duration, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ abortSignal: options.abortSignal, - duration: duration2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, proposedLeaseId: this._leaseId, tracingOptions: updatedOptions.tracingOptions })); @@ -61468,73 +65352,76 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * To change the ID of the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param proposedLeaseId - the proposed new lease Id. * @param options - option to configure lease management operations. * @returns Response data for change lease operation. */ - async changeLease(proposedLeaseId2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a2; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId2, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - this._leaseId = proposedLeaseId2; + this._leaseId = proposedLeaseId; return response; }); } /** * To free the lease if it is no longer needed so that another client may * immediately acquire a lease against the container or the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - option to configure lease management operations. * @returns Response data for release lease operation. */ async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a2; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * To renew the lease. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param options - Optional option to configure lease management operations. * @returns Response data for renew lease operation. */ async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { return this._containerOrBlobOperation.renewLease(this._leaseId, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }); }); @@ -61542,32 +65429,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * To end the lease but ensure that another client cannot acquire a new lease * until the current lease period has expired. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container * and - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * * @param breakPeriod - Break period * @param options - Optional options to configure lease management operations. * @returns Response data for break lease operation. */ - async breakLease(breakPeriod2, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && (((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone || ((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone || ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && (options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone || options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone || options.conditions?.tagConditions)) { throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a2; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { const operationOptions = { abortSignal: options.abortSignal, - breakPeriod: breakPeriod2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions }), + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); }); } }; - var RetriableReadableStream = class extends stream2.Readable { + exports2.BlobLeaseClient = BlobLeaseClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js +var require_RetriableReadableStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/RetriableReadableStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RetriableReadableStream = void 0; + var abort_controller_1 = require_commonjs11(); + var node_stream_1 = require("node:stream"); + var RetriableReadableStream = class extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; /** * Creates an instance of RetriableReadableStream. * @@ -61580,52 +65489,6 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, getter, offset, count, options = {}) { super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = void 0; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } else if (this.offset <= this.end) { - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset).then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }).catch((error3) => { - this.destroy(error3); - }); - } else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; this.getter = getter; this.source = source; this.start = offset; @@ -61651,12 +65514,69 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.source.removeListener("error", this.sourceErrorOrEndHandler); this.source.removeListener("aborted", this.sourceAbortedHandler); } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = void 0; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } else if (this.offset <= this.end) { + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset).then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }).catch((error3) => { + this.destroy(error3); + }); + } else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; _destroy(error3, callback) { this.removeSourceEventHandlers(); this.source.destroy(); callback(error3 === null ? void 0 : error3); } }; + exports2.RetriableReadableStream = RetriableReadableStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js +var require_BlobDownloadResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobDownloadResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobDownloadResponse = void 0; + var core_util_1 = require_commonjs4(); + var RetriableReadableStream_js_1 = require_RetriableReadableStream(); var BlobDownloadResponse = class { /** * Indicates that the service supports @@ -62083,7 +66003,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -62091,6 +66011,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobDownloadResponse. * @@ -62102,13 +66024,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, getter, offset, count, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } }; - var AVRO_SYNC_MARKER_SIZE = 16; - var AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); - var AVRO_CODEC_KEY = "avro.codec"; - var AVRO_SCHEMA_KEY = "avro.schema"; + exports2.BlobDownloadResponse = BlobDownloadResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js +var require_AvroConstants = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroConstants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AVRO_SCHEMA_KEY = exports2.AVRO_CODEC_KEY = exports2.AVRO_INIT_BYTES = exports2.AVRO_SYNC_MARKER_SIZE = void 0; + exports2.AVRO_SYNC_MARKER_SIZE = 16; + exports2.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); + exports2.AVRO_CODEC_KEY = "avro.codec"; + exports2.AVRO_SCHEMA_KEY = "avro.schema"; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js +var require_AvroParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroType = exports2.AvroParser = void 0; var AvroParser = class _AvroParser { /** * Reads a fixed number of bytes from the stream. @@ -62117,8 +66058,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param length - * @param options - */ - static async readFixedBytes(stream3, length, options = {}) { - const bytes = await stream3.read(length, { abortSignal: options.abortSignal }); + static async readFixedBytes(stream2, length, options = {}) { + const bytes = await stream2.read(length, { abortSignal: options.abortSignal }); if (bytes.length !== length) { throw new Error("Hit stream end."); } @@ -62130,19 +66071,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param stream - * @param options - */ - static async readByte(stream3, options = {}) { - const buf = await _AvroParser.readFixedBytes(stream3, 1, options); + static async readByte(stream2, options = {}) { + const buf = await _AvroParser.readFixedBytes(stream2, 1, options); return buf[0]; } // int and long are stored in variable-length zig-zag coding. // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream3, options = {}) { + static async readZigZagLong(stream2, options = {}) { let zigZagEncoded = 0; let significanceInBit = 0; let byte, haveMoreByte, significanceInFloat; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); haveMoreByte = byte & 128; zigZagEncoded |= (byte & 127) << significanceInBit; significanceInBit += 7; @@ -62151,7 +66092,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; zigZagEncoded = zigZagEncoded; significanceInFloat = 268435456; do { - byte = await _AvroParser.readByte(stream3, options); + byte = await _AvroParser.readByte(stream2, options); zigZagEncoded += (byte & 127) * significanceInFloat; significanceInFloat *= 128; } while (byte & 128); @@ -62163,17 +66104,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return zigZagEncoded >> 1 ^ -(zigZagEncoded & 1); } - static async readLong(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readLong(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } - static async readInt(stream3, options = {}) { - return _AvroParser.readZigZagLong(stream3, options); + static async readInt(stream2, options = {}) { + return _AvroParser.readZigZagLong(stream2, options); } static async readNull() { return null; } - static async readBoolean(stream3, options = {}) { - const b = await _AvroParser.readByte(stream3, options); + static async readBoolean(stream2, options = {}) { + const b = await _AvroParser.readByte(stream2, options); if (b === 1) { return true; } else if (b === 0) { @@ -62182,59 +66123,60 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Byte was not a boolean."); } } - static async readFloat(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 4, options); + static async readFloat(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 4, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat32(0, true); } - static async readDouble(stream3, options = {}) { - const u8arr = await _AvroParser.readFixedBytes(stream3, 8, options); + static async readDouble(stream2, options = {}) { + const u8arr = await _AvroParser.readFixedBytes(stream2, 8, options); const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); return view.getFloat64(0, true); } - static async readBytes(stream3, options = {}) { - const size = await _AvroParser.readLong(stream3, options); + static async readBytes(stream2, options = {}) { + const size = await _AvroParser.readLong(stream2, options); if (size < 0) { throw new Error("Bytes size was negative."); } - return stream3.read(size, { abortSignal: options.abortSignal }); + return stream2.read(size, { abortSignal: options.abortSignal }); } - static async readString(stream3, options = {}) { - const u8arr = await _AvroParser.readBytes(stream3, options); + static async readString(stream2, options = {}) { + const u8arr = await _AvroParser.readBytes(stream2, options); const utf8decoder = new TextDecoder(); return utf8decoder.decode(u8arr); } - static async readMapPair(stream3, readItemMethod, options = {}) { - const key = await _AvroParser.readString(stream3, options); - const value = await readItemMethod(stream3, options); + static async readMapPair(stream2, readItemMethod, options = {}) { + const key = await _AvroParser.readString(stream2, options); + const value = await readItemMethod(stream2, options); return { key, value }; } - static async readMap(stream3, readItemMethod, options = {}) { + static async readMap(stream2, readItemMethod, options = {}) { const readPairMethod = (s, opts = {}) => { return _AvroParser.readMapPair(s, readItemMethod, opts); }; - const pairs2 = await _AvroParser.readArray(stream3, readPairMethod, options); + const pairs2 = await _AvroParser.readArray(stream2, readPairMethod, options); const dict = {}; for (const pair of pairs2) { dict[pair.key] = pair.value; } return dict; } - static async readArray(stream3, readItemMethod, options = {}) { + static async readArray(stream2, readItemMethod, options = {}) { const items = []; - for (let count = await _AvroParser.readLong(stream3, options); count !== 0; count = await _AvroParser.readLong(stream3, options)) { + for (let count = await _AvroParser.readLong(stream2, options); count !== 0; count = await _AvroParser.readLong(stream2, options)) { if (count < 0) { - await _AvroParser.readLong(stream3, options); + await _AvroParser.readLong(stream2, options); count = -count; } while (count--) { - const item = await readItemMethod(stream3, options); + const item = await readItemMethod(stream2, options); items.push(item); } } return items; } }; + exports2.AvroParser = AvroParser; var AvroComplex; (function(AvroComplex2) { AvroComplex2["RECORD"] = "record"; @@ -62291,7 +66233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const type2 = schema2.type; try { return _AvroType.fromStringSchema(type2); - } catch (_a) { + } catch { } switch (type2) { case AvroComplex.RECORD: @@ -62331,87 +66273,103 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; + exports2.AvroType = AvroType; var AvroPrimitiveType = class extends AvroType { + _primitive; constructor(primitive) { super(); this._primitive = primitive; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { switch (this._primitive) { case AvroPrimitive.NULL: return AvroParser.readNull(); case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream3, options); + return AvroParser.readBoolean(stream2, options); case AvroPrimitive.INT: - return AvroParser.readInt(stream3, options); + return AvroParser.readInt(stream2, options); case AvroPrimitive.LONG: - return AvroParser.readLong(stream3, options); + return AvroParser.readLong(stream2, options); case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream3, options); + return AvroParser.readFloat(stream2, options); case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream3, options); + return AvroParser.readDouble(stream2, options); case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream3, options); + return AvroParser.readBytes(stream2, options); case AvroPrimitive.STRING: - return AvroParser.readString(stream3, options); + return AvroParser.readString(stream2, options); default: throw new Error("Unknown Avro Primitive"); } } }; var AvroEnumType = class extends AvroType { + _symbols; constructor(symbols) { super(); this._symbols = symbols; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { - const value = await AvroParser.readInt(stream3, options); + async read(stream2, options = {}) { + const value = await AvroParser.readInt(stream2, options); return this._symbols[value]; } }; var AvroUnionType = class extends AvroType { + _types; constructor(types) { super(); this._types = types; } - async read(stream3, options = {}) { - const typeIndex = await AvroParser.readInt(stream3, options); - return this._types[typeIndex].read(stream3, options); + async read(stream2, options = {}) { + const typeIndex = await AvroParser.readInt(stream2, options); + return this._types[typeIndex].read(stream2, options); } }; var AvroMapType = class extends AvroType { + _itemType; constructor(itemType) { super(); this._itemType = itemType; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream3, options = {}) { + read(stream2, options = {}) { const readItemMethod = (s, opts) => { return this._itemType.read(s, opts); }; - return AvroParser.readMap(stream3, readItemMethod, options); + return AvroParser.readMap(stream2, readItemMethod, options); } }; var AvroRecordType = class extends AvroType { + _name; + _fields; constructor(fields, name) { super(); this._fields = fields; this._name = name; } // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream3, options = {}) { + async read(stream2, options = {}) { const record = {}; record["$schema"] = this._name; for (const key in this._fields) { if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream3, options); + record[key] = await this._fields[key].read(stream2, options); } } return record; } }; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js +var require_utils_common3 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/utils/utils.common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.arraysEqual = arraysEqual; function arraysEqual(a, b) { if (a === b) return true; @@ -62425,13 +66383,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return true; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js +var require_AvroReader = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReader.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReader = void 0; + var AvroConstants_js_1 = require_AvroConstants(); + var AvroParser_js_1 = require_AvroParser(); + var utils_common_js_1 = require_utils_common3(); var AvroReader = class { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; get blockOffset() { return this._blockOffset; } + _objectIndex; get objectIndex() { return this._objectIndex; } + _initialized; constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { this._dataStream = dataStream; this._headerStream = headerStream || dataStream; @@ -62441,31 +66424,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this._initialBlockOffset = currentBlockOffset || 0; } async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { abortSignal: options.abortSignal }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { throw new Error("Stream is not an Avro file."); } - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { abortSignal: options.abortSignal }); - const codec = this._metadata[AVRO_CODEC_KEY]; + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; if (!(codec === void 0 || codec === null || codec === "null")) { throw new Error("Codecs are not supported"); } - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal }); - const schema2 = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema2); + const schema2 = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema2); if (this._blockOffset === 0) { this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); this._initialized = true; if (this._objectIndex && this._objectIndex > 0) { for (let i = 0; i < this._objectIndex; i++) { @@ -62477,49 +66460,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; hasNext() { return !this._initialized || this._itemsRemainingInBlock > 0; } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { abortSignal: options.abortSignal - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker2 = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker2)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal - })); - } catch (_a) { - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal + }); + } catch { + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - yield yield tslib.__await(result); } - }); + yield result; + } } }; + exports2.AvroReader = AvroReader; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js +var require_AvroReadable = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadable.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadable = void 0; var AvroReadable = class { }; - var ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); - var AvroReadableFromStream = class extends AvroReadable { + exports2.AvroReadable = AvroReadable; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js +var require_AvroReadableFromStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/AvroReadableFromStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = void 0; + var AvroReadable_js_1 = require_AvroReadable(); + var abort_controller_1 = require_commonjs11(); + var buffer_1 = require("buffer"); + var ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); + var AvroReadableFromStream = class extends AvroReadable_js_1.AvroReadable { + _position; + _readable; toUint8Array(data) { if (typeof data === "string") { - return Buffer.from(data); + return buffer_1.Buffer.from(data); } return data; } @@ -62532,8 +66538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this._position; } async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { + if (options.abortSignal?.aborted) { throw ABORT_ERROR; } if (size < 0) { @@ -62587,7 +66592,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BlobQuickQueryStream = class extends stream2.Readable { + exports2.AvroReadableFromStream = AvroReadableFromStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js +var require_internal_avro = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/internal-avro/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AvroReadableFromStream = exports2.AvroReadable = exports2.AvroReader = void 0; + var AvroReader_js_1 = require_AvroReader(); + Object.defineProperty(exports2, "AvroReader", { enumerable: true, get: function() { + return AvroReader_js_1.AvroReader; + } }); + var AvroReadable_js_1 = require_AvroReadable(); + Object.defineProperty(exports2, "AvroReadable", { enumerable: true, get: function() { + return AvroReadable_js_1.AvroReadable; + } }); + var AvroReadableFromStream_js_1 = require_AvroReadableFromStream(); + Object.defineProperty(exports2, "AvroReadableFromStream", { enumerable: true, get: function() { + return AvroReadableFromStream_js_1.AvroReadableFromStream; + } }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js +var require_BlobQuickQueryStream = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/BlobQuickQueryStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQuickQueryStream = void 0; + var node_stream_1 = require("node:stream"); + var index_js_1 = require_internal_avro(); + var BlobQuickQueryStream = class extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; /** * Creates an instance of BlobQuickQueryStream. * @@ -62596,11 +66640,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(source, options = {}) { super(); - this.avroPaused = true; this.source = source; this.onProgress = options.onProgress; this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); } _read() { @@ -62688,6 +66731,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } while (!avroNext.done && !this.avroPaused); } }; + exports2.BlobQuickQueryStream = BlobQuickQueryStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js +var require_BlobQueryResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobQueryResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobQueryResponse = void 0; + var core_util_1 = require_commonjs4(); + var BlobQuickQueryStream_js_1 = require_BlobQuickQueryStream(); var BlobQueryResponse = class { /** * Indicates that the service supports @@ -63025,7 +67080,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @readonly */ get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : void 0; + return core_util_1.isNodeLike ? this.blobDownloadStream : void 0; } /** * The HTTP response. @@ -63033,6 +67088,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; get _response() { return this.originalResponse._response; } + originalResponse; + blobDownloadStream; /** * Creates an instance of BlobQueryResponse. * @@ -63041,52 +67098,75 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ constructor(originalResponse, options = {}) { this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } }; - exports2.BlockBlobTier = void 0; - (function(BlockBlobTier) { - BlockBlobTier["Hot"] = "Hot"; - BlockBlobTier["Cool"] = "Cool"; - BlockBlobTier["Cold"] = "Cold"; - BlockBlobTier["Archive"] = "Archive"; - })(exports2.BlockBlobTier || (exports2.BlockBlobTier = {})); - exports2.PremiumPageBlobTier = void 0; - (function(PremiumPageBlobTier) { - PremiumPageBlobTier["P4"] = "P4"; - PremiumPageBlobTier["P6"] = "P6"; - PremiumPageBlobTier["P10"] = "P10"; - PremiumPageBlobTier["P15"] = "P15"; - PremiumPageBlobTier["P20"] = "P20"; - PremiumPageBlobTier["P30"] = "P30"; - PremiumPageBlobTier["P40"] = "P40"; - PremiumPageBlobTier["P50"] = "P50"; - PremiumPageBlobTier["P60"] = "P60"; - PremiumPageBlobTier["P70"] = "P70"; - PremiumPageBlobTier["P80"] = "P80"; - })(exports2.PremiumPageBlobTier || (exports2.PremiumPageBlobTier = {})); - function toAccessTier(tier2) { - if (tier2 === void 0) { + exports2.BlobQueryResponse = BlobQueryResponse; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/models.js +var require_models2 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/models.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = void 0; + exports2.toAccessTier = toAccessTier; + exports2.ensureCpkIfSpecified = ensureCpkIfSpecified; + exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; + var constants_js_1 = require_constants10(); + var BlockBlobTier; + (function(BlockBlobTier2) { + BlockBlobTier2["Hot"] = "Hot"; + BlockBlobTier2["Cool"] = "Cool"; + BlockBlobTier2["Cold"] = "Cold"; + BlockBlobTier2["Archive"] = "Archive"; + })(BlockBlobTier || (exports2.BlockBlobTier = BlockBlobTier = {})); + var PremiumPageBlobTier; + (function(PremiumPageBlobTier2) { + PremiumPageBlobTier2["P4"] = "P4"; + PremiumPageBlobTier2["P6"] = "P6"; + PremiumPageBlobTier2["P10"] = "P10"; + PremiumPageBlobTier2["P15"] = "P15"; + PremiumPageBlobTier2["P20"] = "P20"; + PremiumPageBlobTier2["P30"] = "P30"; + PremiumPageBlobTier2["P40"] = "P40"; + PremiumPageBlobTier2["P50"] = "P50"; + PremiumPageBlobTier2["P60"] = "P60"; + PremiumPageBlobTier2["P70"] = "P70"; + PremiumPageBlobTier2["P80"] = "P80"; + })(PremiumPageBlobTier || (exports2.PremiumPageBlobTier = PremiumPageBlobTier = {})); + function toAccessTier(tier) { + if (tier === void 0) { return void 0; } - return tier2; + return tier; } function ensureCpkIfSpecified(cpk, isHttps) { if (cpk && !isHttps) { throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } } - exports2.StorageBlobAudience = void 0; - (function(StorageBlobAudience) { - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; - })(exports2.StorageBlobAudience || (exports2.StorageBlobAudience = {})); + var StorageBlobAudience; + (function(StorageBlobAudience2) { + StorageBlobAudience2["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + StorageBlobAudience2["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; + })(StorageBlobAudience || (exports2.StorageBlobAudience = StorageBlobAudience = {})); function getBlobServiceAccountAudience(storageAccountName) { return `https://${storageAccountName}.blob.core.windows.net/.default`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js +var require_PageBlobRangeResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/PageBlobRangeResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeResponseFromModel = rangeResponseFromModel; function rangeResponseFromModel(response) { const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ offset: x.start, @@ -63096,27 +67176,1201 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; offset: x.start, count: x.end - x.start })); - return Object.assign(Object.assign({}, response), { + return { + ...response, pageRange, clearRange, - _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange - } }) + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange + } + } + }; + } + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/logger.js +var require_logger2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/logger.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = void 0; + var logger_1 = require_commonjs2(); + exports2.logger = (0, logger_1.createClientLogger)("core-lro"); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/constants.js +var require_constants12 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.terminalStates = exports2.POLL_INTERVAL_IN_MS = void 0; + exports2.POLL_INTERVAL_IN_MS = 2e3; + exports2.terminalStates = ["succeeded", "canceled", "failed"]; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/operation.js +var require_operation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollOperation = exports2.initOperation = exports2.deserializeState = void 0; + var logger_js_1 = require_logger2(); + var constants_js_1 = require_constants12(); + function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } + } + exports2.deserializeState = deserializeState; + function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error3) => { + if (isOperationError(error3)) { + stateProxy.setError(state, error3); + stateProxy.setFailed(state); + } + throw error3; + }; + } + function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; + } + function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message + }; + } + function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || isDone === void 0 && ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status)) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult + })); + } + } + function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; + } + async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; + } + exports2.initOperation = initOperation; + async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status: + Polling from: ${state.config.operationLocation} + Operation status: ${status} + Polling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== void 0) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status + }; + } + } + return { response, status }; + } + async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== void 0) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== void 0) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } + } + exports2.pollOperation = pollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/operation.js +var require_operation2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pollHttpOperation = exports2.isOperationError = exports2.getResourceLocation = exports2.getOperationStatus = exports2.getOperationLocation = exports2.initHttpOperation = exports2.getStatusFromInitialResponse = exports2.getErrorFromResponse = exports2.parseRetryAfter = exports2.inferLroMode = void 0; + var operation_js_1 = require_operation(); + var logger_js_1 = require_logger2(); + function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; + } + function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; + } + function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; + } + function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; + } + function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return void 0; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return void 0; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } + } + function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== void 0) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig + }) + }; + } else if (location !== void 0) { + return { + mode: "ResourceLocation", + operationLocation: location + }; + } else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath + }; + } else { + return void 0; + } + } + exports2.inferLroMode = inferLroMode; + function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== void 0) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case void 0: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } + } + function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); + } + function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } else if (statusCode < 300) { + return "succeeded"; + } else { + return "failed"; + } + } + function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== void 0) { + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) ? calculatePollingIntervalFromDate(new Date(retryAfter)) : retryAfterInSeconds * 1e3; + } + return void 0; + } + exports2.parseRetryAfter = parseRetryAfter; + function getErrorFromResponse(response) { + const error3 = accessBodyProperty(response, "error"); + if (!error3) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error3.code || !error3.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error3; + } + exports2.getErrorFromResponse = getErrorFromResponse; + function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor((/* @__PURE__ */ new Date()).getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return void 0; + } + function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case void 0: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === void 0 ? "succeeded" : status; + } + exports2.getStatusFromInitialResponse = getStatusFromInitialResponse; + async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + stateProxy, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult }); } - var BlobBeginCopyFromUrlPoller = class extends coreLro.Poller { + exports2.initHttpOperation = initHttpOperation; + function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse) + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return void 0; + } + } + } + exports2.getOperationLocation = getOperationLocation; + function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } + } + exports2.getOperationStatus = getOperationStatus; + function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; + } + function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; + } + exports2.getResourceLocation = getResourceLocation; + function isOperationError(e) { + return e.name === "RestError"; + } + exports2.isOperationError = isOperationError; + async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult + }); + } + exports2.pollHttpOperation = pollHttpOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/poller/poller.js +var require_poller = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/poller/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.buildCreatePoller = void 0; + var operation_js_1 = require_operation(); + var constants_js_1 = require_constants12(); + var core_util_1 = require_commonjs4(); + var createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => state.status = "canceled", + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.status = "running", + setSucceeded: (state) => state.status = "succeeded", + setFailed: (state) => state.status = "failed", + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded" + }); + function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback ? /* @__PURE__ */ (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() : void 0; + const state = restoreFrom ? (0, operation_js_1.deserializeState)(restoreFrom) : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = /* @__PURE__ */ new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === void 0, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state + }), + onProgress: (callback) => { + const s = /* @__PURE__ */ Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => resultPromise !== null && resultPromise !== void 0 ? resultPromise : resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = void 0; + }), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + } + }; + return poller; + }; + } + exports2.buildCreatePoller = buildCreatePoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/http/poller.js +var require_poller2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/http/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var operation_js_1 = require_operation2(); + var poller_js_1 = require_poller(); + async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, (config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}); + }, + poll: lro.sendPollRequest + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult ? ({ flatResponse }, state) => processResult(flatResponse, state) : ({ flatResponse }) => flatResponse + }); + } + exports2.createHttpPoller = createHttpPoller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js +var require_operation3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/operation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.GenericPollOperation = void 0; + var operation_js_1 = require_operation2(); + var logger_js_1 = require_logger2(); + var createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => state.isCancelled = true, + setError: (state, error3) => state.error = error3, + setResult: (state, result) => state.result = result, + setRunning: (state) => state.isStarted = true, + setSucceeded: (state) => state.isCompleted = true, + setFailed: () => { + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error) + }); + var GenericPollOperation = class { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; + } + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult + })); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === void 0) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState ? (state, { rawResponse }) => updateState(state, rawResponse) : void 0, + isDone: isDone ? ({ flatResponse }, state) => isDone(flatResponse, state) : void 0, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; + } + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; + } + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state + }); + } + }; + exports2.GenericPollOperation = GenericPollOperation; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js +var require_poller3 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/poller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Poller = exports2.PollerCancelledError = exports2.PollerStoppedError = void 0; + var PollerStoppedError = class _PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, _PollerStoppedError.prototype); + } + }; + exports2.PollerStoppedError = PollerStoppedError; + var PollerCancelledError = class _PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, _PollerCancelledError.prototype); + } + }; + exports2.PollerCancelledError = PollerCancelledError; + var Poller = class { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve6, reject) => { + this.resolve = resolve6; + this.reject = reject; + }); + this.promise.catch(() => { + }); + } + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } + } + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this) + }); + } + this.processUpdatedState(); + } + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = void 0; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error3 = new PollerCancelledError("Operation was canceled"); + this.reject(error3); + throw error3; + } + } + if (this.isDone() && this.resolve) { + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); + } + }; + exports2.Poller = Poller; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js +var require_lroEngine = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/lroEngine.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var operation_js_1 = require_operation3(); + var constants_js_1 = require_constants12(); + var poller_js_1 = require_poller3(); + var operation_js_2 = require_operation(); + var LroEngine = class extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState } = options || {}; + const state = resumeFrom ? (0, operation_js_2.deserializeState)(resumeFrom) : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs }; + operation.setPollerConfig(this.config); + } + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); + } + }; + exports2.LroEngine = LroEngine; + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js +var require_lroEngine2 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/lroEngine/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LroEngine = void 0; + var lroEngine_js_1 = require_lroEngine(); + Object.defineProperty(exports2, "LroEngine", { enumerable: true, get: function() { + return lroEngine_js_1.LroEngine; + } }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js +var require_pollOperation = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/legacy/pollOperation.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/core-lro/dist/commonjs/index.js +var require_commonjs14 = __commonJS({ + "node_modules/@azure/core-lro/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createHttpPoller = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var poller_js_1 = require_poller2(); + Object.defineProperty(exports2, "createHttpPoller", { enumerable: true, get: function() { + return poller_js_1.createHttpPoller; + } }); + tslib_1.__exportStar(require_lroEngine2(), exports2); + tslib_1.__exportStar(require_poller3(), exports2); + tslib_1.__exportStar(require_pollOperation(), exports2); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js +var require_BlobStartCopyFromUrlPoller = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/pollers/BlobStartCopyFromUrlPoller.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBeginCopyFromUrlPoller = void 0; + var core_util_1 = require_commonjs4(); + var core_lro_1 = require_commonjs14(); + var BlobBeginCopyFromUrlPoller = class extends core_lro_1.Poller { + intervalInMs; constructor(options) { - const { blobClient, copySource: copySource2, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; + const { blobClient, copySource, intervalInMs = 15e3, onProgress, resumeFrom, startCopyFromURLOptions } = options; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, blobClient, - copySource: copySource2, + copySource, startCopyFromURLOptions - })); + }); super(operation); if (typeof onProgress === "function") { this.onProgress(onProgress); @@ -63124,20 +68378,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.intervalInMs = intervalInMs; } delay() { - return coreUtil.delay(this.intervalInMs); + return (0, core_util_1.delay)(this.intervalInMs); } }; + exports2.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; var cancel = async function cancel2(options = {}) { const state = this.state; - const { copyId: copyId2 } = state; + const { copyId } = state; if (state.isCompleted) { return makeBlobBeginCopyFromURLPollOperation(state); } - if (!copyId2) { + if (!copyId) { state.isCancelled = true; return makeBlobBeginCopyFromURLPollOperation(state); } - await state.blobClient.abortCopyFromURL(copyId2, { + await state.blobClient.abortCopyFromURL(copyId, { abortSignal: options.abortSignal }); state.isCancelled = true; @@ -63145,10 +68400,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; var update = async function update2(options = {}) { const state = this.state; - const { blobClient, copySource: copySource2, startCopyFromURLOptions } = state; + const { blobClient, copySource, startCopyFromURLOptions } = state; if (!state.isStarted) { state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource2, startCopyFromURLOptions); + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); state.copyId = result.copyId; if (result.copyStatus === "success") { state.result = result; @@ -63188,12 +68443,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; function makeBlobBeginCopyFromURLPollOperation(state) { return { - state: Object.assign({}, state), + state: { ...state }, cancel, toString: toString3, update }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Range.js +var require_Range = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Range.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rangeToString = rangeToString; function rangeToString(iRange) { if (iRange.offset < 0) { throw new RangeError(`Range.offset cannot be smaller than 0.`); @@ -63203,27 +68467,61 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return iRange.count ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` : `bytes=${iRange.offset}-`; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js +var require_Batch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Batch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Batch = void 0; + var events_1 = require("events"); var BatchStates; (function(BatchStates2) { BatchStates2[BatchStates2["Good"] = 0] = "Good"; BatchStates2[BatchStates2["Error"] = 1] = "Error"; })(BatchStates || (BatchStates = {})); var Batch = class { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; /** * Creates an instance of Batch. * @param concurrency - */ constructor(concurrency = 5) { - this.actives = 0; - this.completed = 0; - this.offset = 0; - this.operations = []; - this.state = BatchStates.Good; if (concurrency < 1) { throw new RangeError("concurrency must be larger than 0"); } this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); + this.emitter = new events_1.EventEmitter(); } /** * Add a operation into queue. @@ -63293,333 +68591,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var BuffersStream = class extends stream2.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } else { - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } - }; - var maxBufferLength = buffer.constants.MAX_LENGTH; - var PooledBuffer = class { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - this.buffers = []; - this.capacity = capacity; - this._size = 0; - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } - }; - var BufferScheduler = class { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - this.emitter = new events.EventEmitter(); - this.offset = 0; - this.isStreamEnd = false; - this.isError = false; - this.executingOutgoingHandlers = 0; - this.numBuffers = 0; - this.unresolvedDataArray = []; - this.unresolvedLength = 0; - this.incoming = []; - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve6, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer2.getReadableStream(), buffer2.size, this.offset).then(resolve6).catch(reject); - } else if (this.unresolvedLength >= this.bufferSize) { - return; - } else { - resolve6(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer2) { - if (!buffer2) { - buffer2 = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } else { - buffer2.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer2.size; - return buffer2; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer2; - if (this.incoming.length > 0) { - buffer2 = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer2); - } else { - if (this.numBuffers < this.maxBuffers) { - buffer2 = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } else { - return false; - } - } - this.outgoing.push(buffer2); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer2; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer2 = this.outgoing.shift(); - if (buffer2) { - this.triggerOutgoingHandler(buffer2); - } - } while (buffer2); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer2) { - const bufferLength = buffer2.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer2.getReadableStream(), bufferLength, this.offset - bufferLength); - } catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer2); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer2) { - this.incoming.push(buffer2); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } - }; - async function streamToBuffer(stream3, buffer2, offset, end, encoding) { + exports2.Batch = Batch; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js +var require_utils7 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsCreateReadStream = exports2.fsStat = void 0; + exports2.streamToBuffer = streamToBuffer; + exports2.streamToBuffer2 = streamToBuffer2; + exports2.streamToBuffer3 = streamToBuffer3; + exports2.readStreamToLocalFile = readStreamToLocalFile; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var node_fs_1 = tslib_1.__importDefault(require("node:fs")); + var node_util_1 = tslib_1.__importDefault(require("node:util")); + var constants_js_1 = require_constants10(); + async function streamToBuffer(stream2, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; return new Promise((resolve6, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream3.on("readable", () => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream2.on("readable", () => { if (pos >= count) { clearTimeout(timeout); resolve6(); return; } - let chunk = stream3.read(); + let chunk = stream2.read(); if (!chunk) { return; } @@ -63627,28 +68628,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; chunk = Buffer.from(chunk, encoding); } const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer2.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); pos += chunkLength; }); - stream3.on("end", () => { + stream2.on("end", () => { clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve6(); }); - stream3.on("error", (msg) => { + stream2.on("error", (msg) => { clearTimeout(timeout); reject(msg); }); }); } - async function streamToBuffer2(stream3, buffer2, encoding) { + async function streamToBuffer2(stream2, buffer, encoding) { let pos = 0; - const bufferSize = buffer2.length; + const bufferSize = buffer.length; return new Promise((resolve6, reject) => { - stream3.on("readable", () => { - let chunk = stream3.read(); + stream2.on("readable", () => { + let chunk = stream2.read(); if (!chunk) { return; } @@ -63659,18 +68660,30 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); return; } - buffer2.fill(chunk, pos, pos + chunk.length); + buffer.fill(chunk, pos, pos + chunk.length); pos += chunk.length; }); - stream3.on("end", () => { + stream2.on("end", () => { resolve6(pos); }); - stream3.on("error", reject); + stream2.on("error", reject); + }); + } + async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve6, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve6(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { return new Promise((resolve6, reject) => { - const ws = fs__namespace.createWriteStream(file); + const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); }); @@ -63681,9 +68694,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; rs.pipe(ws); }); } - var fsStat = util__namespace.promisify(fs__namespace.stat); - var fsCreateReadStream = fs__namespace.createReadStream; - var BlobClient = class _BlobClient extends StorageClient { + exports2.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); + exports2.fsCreateReadStream = node_fs_1.default.createReadStream; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/Clients.js +var require_Clients = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/Clients.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PageBlobClient = exports2.BlockBlobClient = exports2.AppendBlobClient = exports2.BlobClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_auth_1 = require_commonjs7(); + var core_util_1 = require_commonjs4(); + var core_util_2 = require_commonjs4(); + var BlobDownloadResponse_js_1 = require_BlobDownloadResponse(); + var BlobQueryResponse_js_1 = require_BlobQueryResponse(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var models_js_1 = require_models2(); + var PageBlobRangeResponse_js_1 = require_PageBlobRangeResponse(); + var Pipeline_js_1 = require_Pipeline(); + var BlobStartCopyFromUrlPoller_js_1 = require_BlobStartCopyFromUrlPoller(); + var Range_js_1 = require_Range(); + var StorageClient_js_1 = require_StorageClient(); + var Batch_js_1 = require_Batch(); + var storage_common_1 = require_commonjs13(); + var constants_js_1 = require_constants10(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var utils_js_1 = require_utils7(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var BlobClient = class _BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; /** * The name of the blob. */ @@ -63699,49 +68751,49 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url3; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + let url2; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } /** * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. @@ -63750,8 +68802,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp */ - withSnapshot(snapshot2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a new BlobClient object pointing to a version of this blob. @@ -63760,8 +68812,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param versionId - The versionId. * @returns A new BlobClient object pointing to the version of this blob. */ - withVersion(versionId2) { - return new _BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId2.length === 0 ? void 0 : versionId2), this.pipeline); + withVersion(versionId) { + return new _BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? void 0 : versionId), this.pipeline); } /** * Creates a AppendBlobClient object. @@ -63791,7 +68843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * In Node.js, data returns in a Readable stream readableStreamBody * * In browsers, data returns in a promise blobBody * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob * * @param offset - From which position of the blob to download, greater than or equal to 0 * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined @@ -63800,76 +68852,106 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); * } * ``` * * Example usage (browser): * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), * ); * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); * } * ``` */ async download(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { - onDownloadProgress: coreUtil.isNode ? void 0 : options.onProgress + onDownloadProgress: core_util_1.isNodeLike ? void 0 : options.onProgress // for Node.js, progress is reported by RetriableReadableStream }, - range: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + range: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - if (!coreUtil.isNode) { + const wrappedRes = { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; + if (!core_util_1.isNodeLike) { return wrappedRes; } if (options.maxRetryRequests === void 0 || options.maxRetryRequests < 0) { - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; } if (res.contentLength === void 0) { throw new RangeError(`File download response doesn't contain valid content length header`); @@ -63877,8 +68959,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!res.etag) { throw new RangeError(`File download response doesn't contain valid etag header`); } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a2; + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { const updatedDownloadOptions = { leaseAccessConditions: options.conditions, modifiedAccessConditions: { @@ -63886,9 +68967,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; ifModifiedSince: options.conditions.ifModifiedSince, ifNoneMatch: options.conditions.ifNoneMatch, ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a2 = options.conditions) === null || _a2 === void 0 ? void 0 : _a2.tagConditions + ifTags: options.conditions?.tagConditions }, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ count: offset + res.contentLength - start, offset: start }), @@ -63897,7 +68978,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }; - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions + })).readableStreamBody; }, offset, res.contentLength, { maxRetryRequests: options.maxRetryRequests, onProgress: options.onProgress @@ -63914,9 +68998,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - options to Exists operation. */ async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); await this.getProperties({ abortSignal: options.abortSignal, customerProvidedKey: options.customerProvidedKey, @@ -63927,7 +69011,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } catch (e) { if (e.statusCode === 404) { return false; - } else if (e.statusCode === 409 && (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { + } else if (e.statusCode === 409 && (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { return true; } throw e; @@ -63937,7 +69021,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns all user-defined metadata, standard HTTP properties, and system properties * for the blob. It does not return the content of the blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -63948,17 +69032,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getProperties(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); + return { + ...res, + _response: res._response, + // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules) + }; }); } /** @@ -63966,19 +69058,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async delete(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -63988,19 +69082,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param options - Optional options to Blob Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -64010,13 +69112,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Restores the contents and metadata of soft deleted blob and any associated * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 * or later. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob * * @param options - Optional options to Blob Undelete operation. */ async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -64027,7 +69129,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no value provided, or no value provided for the specified blob HTTP headers, * these blob HTTP headers without a value will be cleared. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param blobHTTPHeaders - If no value provided, or no value provided for * the specified blob HTTP headers, these blob HTTP @@ -64039,14 +69141,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async setHTTPHeaders(blobHTTPHeaders, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. tracingOptions: updatedOptions.tracingOptions })); @@ -64057,22 +69161,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * If no option provided, or no metadata defined in the parameter, the blob * metadata will be removed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Optional options to Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -64088,15 +69194,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param tags - * @param options - */ - async setTags(tags2, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags2) + tags: (0, utils_common_js_1.toBlobTags)(tags) })); }); } @@ -64106,15 +69214,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {} + }; return wrappedResponse; }); } @@ -64125,24 +69240,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the blob. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a read-only snapshot of a blob. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob * * @param options - Optional options to the Blob Create Snapshot operation. */ async createSnapshot(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions @@ -64163,57 +69280,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * - * Example using automatic polling: + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using manual polling: + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); * } - * const result = copyPoller.getResult(); - * ``` + * const manualResult = manualCopyPoller.getResult(); * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { * onProgress(state) { * console.log(`Progress: ${state.copyProgress}`); - * } + * }, * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress * }); - * const result = await copyPoller.pollUntilDone(); - * ``` + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); * // cancel operation after starting it. * try { - * await copyPoller.cancelOperation(); + * await cancelCopyPoller.cancelOperation(); * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); * } * } * ``` @@ -64221,15 +69339,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async beginCopyFromURL(copySource2, options = {}) { + async beginCopyFromURL(copySource, options = {}) { const client = { abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), getProperties: (...args) => this.getProperties(...args), startCopyFromURL: (...args) => this.startCopyFromURL(...args) }; - const poller = new BlobBeginCopyFromUrlPoller({ + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ blobClient: client, - copySource: copySource2, + copySource, intervalInMs: options.intervalInMs, onProgress: options.onProgress, resumeFrom: options.resumeFrom, @@ -64241,14 +69359,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero * length and full metadata. Version 2012-02-12 and newer. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob * * @param copyId - Id of the Copy From URL operation. * @param options - Optional options to the Blob Abort Copy From URL operation. */ - async abortCopyFromURL(copyId2, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId2, { + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -64258,36 +69376,39 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not * return a response until the copy is complete. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url * * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication * @param options - */ - async syncCopyFromURL(copySource2, options = {}) { + async syncCopyFromURL(copySource, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource2, { + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -64298,31 +69419,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * storage only). A premium page blob's tier determines the allowed size, IOPS, * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive * storage type. This operation does not update the blob's ETag. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier * * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. * @param options - Optional options to the Blob Set Tier operation. */ - async setAccessTier(tier2, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier2), { + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, rehydratePriority: options.rehydratePriority, tracingOptions: updatedOptions.tracingOptions })); }); } async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer2; + let buffer; let offset = 0; let count = 0; let options = param4; if (param1 instanceof Buffer) { - buffer2 = param1; + buffer = param1; offset = param2 || 0; count = typeof param3 === "number" ? param3 : 0; } else { @@ -64330,12 +69452,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; count = typeof param2 === "number" ? param2 : 0; options = param3 || {}; } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; + let blockSize = options.blockSize ?? 0; if (blockSize < 0) { throw new RangeError("blockSize option must be >= 0"); } if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } if (offset < 0) { throw new RangeError("offset option must be >= 0"); @@ -64346,26 +69468,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions + }); count = response.contentLength - offset; if (count < 0) { throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); } } - if (!buffer2) { + if (!buffer) { try { - buffer2 = Buffer.alloc(count); + buffer = Buffer.alloc(count); } catch (error3) { throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error3.message}`); } } - if (buffer2.length < count) { + if (buffer.length < count) { throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); } let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let off = offset; off < offset + count; off = off + blockSize) { batch.addOperation(async () => { let chunkEnd = offset + count; @@ -64379,8 +69504,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; customerProvidedKey: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions }); - const stream3 = response.readableStreamBody; - await streamToBuffer(stream3, buffer2, off - offset, chunkEnd - offset); + const stream2 = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream2, buffer, off - offset, chunkEnd - offset); transferProgress += chunkEnd - off; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress }); @@ -64388,7 +69513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } await batch.do(); - return buffer2; + return buffer; }); } /** @@ -64408,10 +69533,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * at the specified path. */ async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); } response.blobDownloadStream = void 0; return response; @@ -64426,7 +69554,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); containerName = pathComponents[1]; blobName = pathComponents[3]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); containerName = pathComponents[2]; blobName = pathComponents[4]; @@ -64454,21 +69582,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * an Azure file in any Azure storage account. * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob * operation to copy from another storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob * * @param copySource - url to the source Azure Blob/File. * @param options - Optional options to the Blob Start Copy From URL operation. */ - async startCopyFromURL(copySource2, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource2, { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { sourceIfMatch: options.sourceConditions.ifMatch, sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, @@ -64476,12 +69606,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, sourceIfTags: options.sourceConditions.tagConditions }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), sealBlob: options.sealBlob, tracingOptions: updatedOptions.tracingOptions })); @@ -64493,18 +69623,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve6) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve6(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -64513,17 +69649,67 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, this.credential).stringToSign; + } + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve6) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Delete the immutablility policy on the blob. @@ -64531,8 +69717,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to delete immutability policy on the blob. */ async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ tracingOptions: updatedOptions.tracingOptions })); }); @@ -64543,8 +69729,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set immutability policy on the blob. */ async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, tracingOptions: updatedOptions.tracingOptions @@ -64557,8 +69743,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional options to set legal hold on the blob. */ async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { tracingOptions: updatedOptions.tracingOptions })); }); @@ -64568,60 +69754,65 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.BlobClient = BlobClient; var AppendBlobClient = class _AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -64632,40 +69823,55 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - Options to the Append Block Create operation. * * * Example usage: * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); * await appendBlobClient.create(); * ``` */ async create(options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -64673,20 +69879,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param options - */ async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -64699,20 +69916,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async seal(options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Commits a new block of data to the end of the existing append blob. - * @see https://docs.microsoft.com/rest/api/storageservices/append-block + * @see https://learn.microsoft.com/rest/api/storageservices/append-block * * @param body - Data to be appended. * @param contentLength - Length of the body in bytes. @@ -64721,29 +69940,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * * const content = "Hello World!"; * * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await newAppendBlobClient.create(); * await newAppendBlobClient.appendBlock(content, content.length); * * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); * await existingAppendBlobClient.appendBlock(content, content.length); * ``` */ - async appendBlock(body2, contentLength2, options = {}) { + async appendBlock(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, @@ -64758,7 +69992,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Append Block operation commits a new block of data to the end of an existing append blob * where the contents are read from a source url. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url * * @param sourceURL - * The url to the blob that will be the source of the copy. A source blob in the same storage account can @@ -64772,74 +70006,89 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.AppendBlobClient = AppendBlobClient; var BlockBlobClient = class _BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; + url2 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -64851,8 +70100,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * ONLY AVAILABLE IN NODE.JS RUNTIME. @@ -64861,15 +70110,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage (Node.js): * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * async function streamToBuffer(readableStream) { + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { * return new Promise((resolve, reject) => { - * const chunks = []; + * const chunks: Buffer[] = []; * readableStream.on("data", (data) => { * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); * }); @@ -64885,26 +70151,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { throw new Error("This operation currently is only supported in Node.js."); } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ abortSignal: options.abortSignal, queryRequest: { queryType: "SQL", expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration) + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration) }, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, tracingOptions: updatedOptions.tracingOptions })); - return new BlobQueryResponse(response, { + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { abortSignal: options.abortSignal, onProgress: options.onProgress, onError: options.onError @@ -64922,7 +70190,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link uploadStream} or {@link uploadBrowserData} for better performance * with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function * which returns a new Readable stream whose offset is from data source beginning. @@ -64933,32 +70201,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ - async upload(body2, contentLength2, options = {}) { + async upload(body, contentLength, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength2, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -64983,22 +70267,37 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async syncUploadFromURL(sourceURL, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Uploads the specified block to the block blob's "staging area" to be later * committed by a call to commitBlockList. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block + * @see https://learn.microsoft.com/rest/api/storageservices/put-block * * @param blockId - A 64-byte value that is base64-encoded * @param body - Data to upload to the staging area. @@ -65006,10 +70305,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block operation. * @returns Response data for the Block Blob Stage Block operation. */ - async stageBlock(blockId2, body2, contentLength2, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId2, contentLength2, body2, { + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: { @@ -65027,7 +70326,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The Stage Block From URL operation creates a new block to be committed as part * of a blob where the contents are read from a URL. * This API is available starting in version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url * * @param blockId - A 64-byte value that is base64-encoded * @param sourceURL - Specifies the URL of the blob. The value @@ -65044,18 +70343,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Block Blob Stage Block From URL operation. * @returns Response data for the Block Blob Stage Block From URL operation. */ - async stageBlockFromURL(blockId2, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId2, 0, sourceURL, { + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? void 0 : rangeToString({ offset, count }), + sourceRange: offset === 0 && !count ? void 0 : (0, Range_js_1.rangeToString)({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65066,30 +70366,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to * update a blob by uploading only those blocks that have changed, then committing the new and existing * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list * * @param blocks - Array of 64-byte value that is base64-encoded * @param options - Options to the Block Blob Commit Block List operation. * @returns Response data for the Block Blob Commit Block List operation. */ - async commitBlockList(blocks2, options = {}) { + async commitBlockList(blocks, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks2 }, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65097,20 +70399,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Returns the list of blocks that have been uploaded as part of a block blob * using the specified block list filter. - * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list * * @param listType - Specifies whether to return the list of committed blocks, * the list of uncommitted blocks, or both lists together. * @param options - Options to the Block Blob Get Block List operation. * @returns Response data for the Block Blob Get Block List operation. */ - async getBlockList(listType2, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType2, { + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); if (!res.committedBlocks) { @@ -65139,18 +70443,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer2; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; if (data instanceof Buffer) { - buffer2 = data; + buffer = data; } else if (data instanceof ArrayBuffer) { - buffer2 = Buffer.from(data); + buffer = Buffer.from(data); } else { data = data; - buffer2 = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); } - return this.uploadSeekableInternal((offset, size) => buffer2.slice(offset, offset + size), buffer2.byteLength, updatedOptions); + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); } else { const browserBlob = new Blob([data]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); @@ -65177,7 +70481,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { const browserBlob = new Blob([browserData]); return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); }); @@ -65198,23 +70502,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { throw new RangeError(`${size} is too larger to upload to a block blob.`); } if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } } } @@ -65224,32 +70527,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); } const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; - const batch = new Batch(options.concurrency); + const batch = new Batch_js_1.Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); const start = blockSize * i; const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength2 = end - start; + const contentLength = end - start; blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength2), contentLength2, { + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { abortSignal: options.abortSignal, conditions: options.conditions, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions }); - transferProgress += contentLength2; + transferProgress += contentLength; if (options.onProgress) { options.onProgress({ loadedBytes: transferProgress @@ -65275,15 +70578,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Response data for the Blob Upload operation. */ async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { autoClose: true, end: count ? offset + count - 1 : Infinity, start: offset }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions + }); }); } /** @@ -65302,27 +70608,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to Upload Stream to Block Blob operation. * @returns Response data for the Blob Upload operation. */ - async uploadStream(stream3, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + async uploadStream(stream2, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { if (!options.blobHTTPHeaders) { options.blobHTTPHeaders = {}; } if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); + const blockIDPrefix = (0, core_util_2.randomUUID)(); let transferProgress = 0; const blockList = []; - const scheduler = new BufferScheduler( - stream3, + const scheduler = new storage_common_1.BufferScheduler( + stream2, bufferSize, maxConcurrency, - async (body2, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); + async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); blockList.push(blockID); blockNum++; - await this.stageBlock(blockID, body2, length, { + await this.stageBlock(blockID, body, length, { customerProvidedKey: options.customerProvidedKey, conditions: options.conditions, encryptionScope: options.encryptionScope, @@ -65340,50 +70646,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; Math.ceil(maxConcurrency / 4 * 3) ); await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions + })); }); } }; + exports2.BlockBlobClient = BlockBlobClient; var PageBlobClient = class _PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url3, pipeline); + super(url2, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -65394,13 +70708,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param snapshot - The snapshot timestamp. * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. */ - withSnapshot(snapshot2) { - return new _PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot2.length === 0 ? void 0 : snapshot2), this.pipeline); + withSnapshot(snapshot) { + return new _PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? void 0 : snapshot), this.pipeline); } /** * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - Options to the Page Blob Create operation. @@ -65408,23 +70722,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async create(size, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), tracingOptions: updatedOptions.tracingOptions })); }); @@ -65433,21 +70749,33 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Creates a page blob of the specified length. Call uploadPages to upload data * data to a page blob. If the blob with the same name already exists, the content * of the existing blob will remain unchanged. - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param size - size of the page blob. * @param options - */ async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions + })); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -65455,7 +70783,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param body - Data to upload * @param offset - Offset of destination page blob @@ -65463,19 +70791,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Upload Pages operation. * @returns Response data for the Page Blob Upload Pages operation. */ - async uploadPages(body2, offset, count, options = {}) { + async uploadPages(body, offset, count, options = {}) { options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body2, { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, requestOptions: { onUploadProgress: options.onProgress }, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, @@ -65488,7 +70818,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * The Upload Pages operation writes a range of pages to a page blob where the * contents are read from a URL. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url * * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob @@ -65499,32 +70829,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { options.conditions = options.conditions || {}; options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, tracingOptions: updatedOptions.tracingOptions })); }); } /** * Frees the specified pages from the page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/put-page + * @see https://learn.microsoft.com/rest/api/storageservices/put-page * * @param offset - Starting byte position of the pages to clear. * @param count - Number of bytes to clear. @@ -65533,13 +70866,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async clearPages(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, @@ -65549,7 +70884,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -65558,16 +70893,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRanges(offset = 0, count, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** @@ -65575,22 +70912,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to PageBlob Get Page Ranges Segment operation. */ - async listPageRangesSegment(offset = 0, count, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker2, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); @@ -65610,17 +70949,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to List Page Ranges operation. */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker2, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -65629,94 +70966,79 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param count - Number of bytes to get. * @param options - Options to List Page Ranges operation. */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges for a page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax * let i = 1; * for await (const pageRange of pageBlobClient.listPageRanges()) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param options - Options to the Page Blob Get Ranges operation. @@ -65742,13 +71064,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -65758,17 +71083,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(result); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); }); } /** @@ -65777,7 +71104,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call getPageRangesDiffSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. @@ -65785,20 +71112,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions + }, prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ + range: (0, Range_js_1.rangeToString)({ offset, count }), - marker: marker2, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, + marker, + maxPageSize: options?.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); }); @@ -65819,17 +71148,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker2 || marker2 === void 0) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker2, options)); - marker2 = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker2); - } - }); + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === void 0) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects @@ -65839,94 +71166,88 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. * @param options - Options to the Page Blob Get Page Ranges Diff operation. */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } /** * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. * - * Example using `for await` syntax: + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); * } * } * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` * @param offset - Starting byte position of the page ranges. * @param count - Number of bytes to get. * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. @@ -65935,7 +71256,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ listPageRangesDiff(offset, count, prevSnapshot, options = {}) { options.conditions = options.conditions || {}; - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options + }); return { /** * The next method, part of the iteration protocol @@ -65953,13 +71276,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options + }); } }; } /** * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges * * @param offset - Starting byte position of the page blob * @param count - Number of bytes to get ranges diff. @@ -65967,24 +71293,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Page Blob Get Page Ranges Diff operation. * @returns Response data for the Page Blob Get Page Range Diff operation. */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl2, options = {}) { + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl: prevSnapshotUrl2, - range: rangeToString({ offset, count }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), tracingOptions: updatedOptions.tracingOptions })); - return rangeResponseFromModel(response); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); }); } /** * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param size - Target size * @param options - Options to the Page Blob Resize operation. @@ -65992,12 +71320,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ async resize(size, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, encryptionScope: options.encryptionScope, tracingOptions: updatedOptions.tracingOptions })); @@ -66005,22 +71335,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Sets a page blob's sequence number. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties * * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. * @param sequenceNumber - Required if sequenceNumberAction is max or update * @param options - Options to the Page Blob Update Sequence Number operation. * @returns Response data for the Page Blob Update Sequence Number operation. */ - async updateSequenceNumber(sequenceNumberAction2, sequenceNumber, options = {}) { + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction2, { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); @@ -66030,38 +71362,72 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * The snapshot is copied such that only the differential changes between the previously * copied snapshot are transferred to the destination. * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots * * @param copySource - Specifies the name of the source page blob snapshot. For example, * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= * @param options - Options to the Page Blob Copy Incremental operation. * @returns Response data for the Page Blob Copy Incremental operation. */ - async startCopyIncremental(copySource2, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource2, { + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions + }, tracingOptions: updatedOptions.tracingOptions })); }); } }; + exports2.PageBlobClient = PageBlobClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js +var require_BatchUtils = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchUtils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getBodyAsText = getBodyAsText; + exports2.utf8ByteLength = utf8ByteLength; + var utils_js_1 = require_utils7(); + var constants_js_1 = require_constants10(); async function getBodyAsText(batchResponse) { - let buffer2 = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer2); - buffer2 = buffer2.slice(0, responseLength); - return buffer2.toString(); + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } function utf8ByteLength(str2) { return Buffer.byteLength(str2); } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js +var require_BatchResponseParser = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponseParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BatchResponseParser = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_http_compat_1 = require_commonjs9(); + var constants_js_1 = require_constants10(); + var BatchUtils_js_1 = require_BatchUtils(); + var log_js_1 = require_log5(); var HTTP_HEADER_DELIMITER = ": "; var SPACE_DELIMITER = " "; var NOT_FOUND = -1; var BatchResponseParser = class { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; constructor(batchResponse, subRequests) { if (!batchResponse || !batchResponse.contentType) { throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); @@ -66072,15 +71438,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.batchResponse = batchResponse; this.subRequests = subRequests; this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response async parseBatchResponse() { - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - const responseBodyAsText = await getBodyAsText(this.batchResponse); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); const subResponses = responseBodyAsText.split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1); const subResponseCount = subResponses.length; if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { @@ -66092,18 +71458,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; for (let index = 0; index < subResponseCount; index++) { const subResponse = subResponses[index]; const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); let subRespHeaderStartFound = false; let subRespHeaderEndFound = false; let subRespFailed = false; let contentId = NOT_FOUND; for (const responseLine of responseLines) { if (!subRespHeaderStartFound) { - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); } - if (responseLine.startsWith(HTTP_VERSION_1_1)) { + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { subRespHeaderStartFound = true; const tokens = responseLine.split(SPACE_DELIMITER); deserializedSubResponse.status = parseInt(tokens[1]); @@ -66123,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } const tokens = responseLine.split(HTTP_HEADER_DELIMITER); deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { deserializedSubResponse.errorCode = tokens[1]; subRespFailed = true; } @@ -66138,7 +71504,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; deserializedSubResponse._request = this.subRequests.get(contentId); deserializedSubResponses[contentId] = deserializedSubResponse; } else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); } if (subRespFailed) { subResponsesFailedCount++; @@ -66153,6 +71519,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } }; + exports2.BatchResponseParser = BatchResponseParser; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js +var require_Mutex = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/utils/Mutex.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Mutex = void 0; var MutexLockStatus; (function(MutexLockStatus2) { MutexLockStatus2[MutexLockStatus2["LOCKED"] = 0] = "LOCKED"; @@ -66192,6 +71568,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; resolve6(); }); } + static keys = {}; + static listeners = {}; static onUnlockEvent(key, handler) { if (this.listeners[key] === void 0) { this.listeners[key] = [handler]; @@ -66208,11 +71586,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - Mutex.keys = {}; - Mutex.listeners = {}; + exports2.Mutex = Mutex; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js +var require_BlobBatch = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatch.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatch = void 0; + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_2 = require_commonjs4(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var Clients_js_1 = require_Clients(); + var Mutex_js_1 = require_Mutex(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); + var core_xml_1 = require_commonjs10(); + var constants_js_1 = require_constants10(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var tracing_js_1 = require_tracing(); + var core_client_1 = require_commonjs8(); + var StorageSharedKeyCredentialPolicyV2_js_1 = require_StorageSharedKeyCredentialPolicyV22(); var BlobBatch = class { + batchRequest; + batch = "batch"; + batchType; constructor() { - this.batch = "batch"; this.batchRequest = new InnerBatchRequest(); } /** @@ -66236,13 +71639,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.batchRequest.getSubRequests(); } async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); + await Mutex_js_1.Mutex.lock(this.batch); try { this.batchRequest.preAddSubRequest(subRequest); await assembleSubRequestFunc(); this.batchRequest.postAddSubRequest(subRequest); } finally { - await Mutex.unlock(this.batch); + await Mutex_js_1.Mutex.unlock(this.batch); } } setBatchType(batchType) { @@ -66254,13 +71657,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url3; + let url2; let credential; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url3 = urlOrBlobClient; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + url2 = urlOrBlobClient; credential = credentialOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -66269,28 +71672,28 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url3; + let url2; let credential; - let tier2; - if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url3 = urlOrBlobClient; + let tier; + if (typeof urlOrBlobClient === "string" && (core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + url2 = urlOrBlobClient; credential = credentialOrTier; - tier2 = tierOrOptions; - } else if (urlOrBlobClient instanceof BlobClient) { - url3 = urlOrBlobClient.url; + tier = tierOrOptions; + } else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + url2 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; - tier2 = credentialOrTier; + tier = credentialOrTier; options = tierOrOptions; } else { throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); @@ -66298,24 +71701,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options) { options = {}; } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url3, + url: url2, credential }, async () => { - await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new Clients_js_1.BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); }); }); } }; + exports2.BlobBatch = BlobBatch; var InnerBatchRequest = class { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; constructor() { this.operationCount = 0; this.body = ""; - const tempGuid = coreUtil.randomUUID(); + const tempGuid = (0, core_util_1.randomUUID)(); this.boundary = `batch_${tempGuid}`; - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; this.batchRequestEnding = `--${this.boundary}--`; this.subRequests = /* @__PURE__ */ new Map(); @@ -66328,9 +71739,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. */ createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, serializerOptions: { xml: { xmlCharKey: "#" @@ -66339,19 +71750,19 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }), { phase: "Serialize" }); corePipeline.addPolicy(batchHeaderFilterPolicy()); corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge } + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge } }), { phase: "Sign" }); - } else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ + } else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ accountName: credential.accountName, accountKey: credential.accountKey }), { phase: "Sign" }); } - const pipeline = new Pipeline([]); + const pipeline = new Pipeline_js_1.Pipeline([]); pipeline._credential = credential; pipeline._corePipeline = corePipeline; return pipeline; @@ -66360,23 +71771,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; this.body += [ this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}` // sub request start line with method - ].join(HTTP_LINE_ENDING); + ].join(constants_js_1.HTTP_LINE_ENDING); for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - this.body += HTTP_LINE_ENDING; + this.body += constants_js_1.HTTP_LINE_ENDING; } preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path12 = getURLPath(subRequest.url); + const path12 = (0, utils_common_js_1.getURLPath)(subRequest.url); if (!path12 || path12 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } @@ -66387,7 +71798,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } // Return the http request body with assembling the ending line to the sub request body. getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; } getMultipartContentType() { return this.multipartContentType; @@ -66404,7 +71815,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return { request, status: 200, - headers: coreRestPipeline.createHttpHeaders() + headers: (0, core_rest_pipeline_1.createHttpHeaders)() }; } }; @@ -66415,7 +71826,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; async sendRequest(request, next) { let xMsHeaderName = ""; for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { xMsHeaderName = name; } } @@ -66426,18 +71837,36 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }; } + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js +var require_BlobBatchClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobBatchClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobBatchClient = void 0; + var BatchResponseParser_js_1 = require_BatchResponseParser(); + var BatchUtils_js_1 = require_BatchUtils(); + var BlobBatch_js_1 = require_BlobBatch(); + var tracing_js_1 = require_tracing(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageContextClient_js_1 = require_StorageContextClient(); + var Pipeline_js_1 = require_Pipeline(); + var utils_common_js_1 = require_utils_common(); var BlobBatchClient = class { - constructor(url3, credentialOrPipeline, options) { + serviceOrContainerContext; + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; } else if (!credentialOrPipeline) { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - pipeline = newPipeline(credentialOrPipeline, options); + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path12 = getURLPath(url3); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path12 = (0, utils_common_js_1.getURLPath)(url2); if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -66449,10 +71878,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * A BlobBatch represents an aggregated set of operations on blobs. */ createBatch() { - return new BlobBatch(); + return new BlobBatch_js_1.BlobBatch(); } async deleteBlobs(urlsOrBlobClients, credentialOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); @@ -66463,7 +71892,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return this.submitBatch(batch); } async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, options) { - const batch = new BlobBatch(); + const batch = new BlobBatch_js_1.BlobBatch(); for (const urlOrBlobClient of urlsOrBlobClients) { if (typeof urlOrBlobClient === "string") { await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); @@ -66481,11 +71910,25 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); @@ -66493,17 +71936,32 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using a lease: * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, * }); * const batchResp = await blobBatchClient.submitBatch(batchRequest); * console.log(batchResp.subResponsesSucceededCount); * ``` * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @param batchRequest - A set of Delete or SetTier operations. * @param options - @@ -66512,10 +71970,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!batchRequest || batchRequest.getSubRequests().size === 0) { throw new RangeError("Batch request should contain one or more sub requests."); } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { const batchRequestBody = batchRequest.getHttpRequestBody(); - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions + })); + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); const responseSummary = await batchResponseParser.parseBatchResponse(); const res = { _response: rawBatchResponse._response, @@ -66532,7 +71992,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }); } }; - var ContainerClient = class extends StorageClient { + exports2.BlobBatchClient = BlobBatchClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js +var require_ContainerClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/ContainerClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ContainerClient = void 0; + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var core_auth_1 = require_commonjs7(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var Pipeline_js_1 = require_Pipeline(); + var StorageClient_js_1 = require_StorageClient(); + var tracing_js_1 = require_tracing(); + var utils_common_js_1 = require_utils_common(); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + var BlobLeaseClient_js_1 = require_BlobLeaseClient(); + var Clients_js_1 = require_Clients(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var ContainerClient = class extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; /** * The name of the container. */ @@ -66541,48 +72029,48 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url3; + let url2; options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; - } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url3 = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); + } else if (core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url3 = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - pipeline = newPipeline(sharedKeyCredential, options); + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); + url2 = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url3, pipeline); + super(url2, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } /** * Creates a new container under the specified account. If the container with * the same name already exists, the operation fails. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - Options to Container Create operation. @@ -66590,34 +72078,52 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * const createContainerResponse = await containerClient.create(); * console.log("Container was created successfully", createContainerResponse.requestId); * ``` */ async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); }); } /** * Creates a new container under the specified account. If the container with * the same name already exists, it is not changed. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * @see https://learn.microsoft.com/rest/api/storageservices/create-container * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata * * @param options - */ async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { try { const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + // _response is made non-enumerable + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } else { throw e; } @@ -66634,7 +72140,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - */ async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { try { await this.getProperties({ abortSignal: options.abortSignal, @@ -66656,7 +72162,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -66664,7 +72170,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -66674,15 +72180,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js - * const content = "Hello world!"; + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * const blockBlobClient = containerClient.getBlockBlobClient(""); + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -66690,12 +72208,12 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified * container. The data returned does not include the container's list of blobs. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties * * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if * they originally contained uppercase characters. This differs from the metadata keys returned by @@ -66708,14 +72226,18 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** * Marks the specified container for deletion. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ @@ -66723,8 +72245,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -66735,19 +72257,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Marks the specified container for deletion if it exists. The container and any blobs * contained within it are later deleted during garbage collection. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container * * @param options - Options to Container Delete operation. */ async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { try { const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); + return { + succeeded: true, + ...res, + _response: res._response + }; } catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response + }; } throw e; } @@ -66759,24 +72288,24 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * If no option provided, or no metadata defined in the parameter, the container * metadata will be removed. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata * * @param metadata - Replace existing metadata with this value. * If no value provided the existing metadata will be removed. * @param options - Options to Container Set Metadata operation. */ - async setMetadata(metadata2, options = {}) { + async setMetadata(metadata, options = {}) { if (!options.conditions) { options.conditions = {}; } if (options.conditions.ifUnmodifiedSince) { throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, - metadata: metadata2, + metadata, modifiedAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions })); @@ -66789,7 +72318,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl * * @param options - Options to Container Get Access Policy operation. */ @@ -66797,8 +72326,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (!options.conditions) { options.conditions = {}; } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, tracingOptions: updatedOptions.tracingOptions @@ -66847,29 +72376,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. * During this interval, a shared access signature that is associated with the stored access policy will * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl * * @param access - The level of public access to data in the container. * @param containerAcl - Array of elements each having a unique Id and details of the access policy. * @param options - Options to Container Set Access Policy operation. */ - async setAccessPolicy(access2, containerAcl2, options = {}) { + async setAccessPolicy(access, containerAcl, options = {}) { options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { const acl = []; - for (const identifier of containerAcl2 || []) { + for (const identifier of containerAcl || []) { acl.push({ accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) : "", + expiresOn: identifier.accessPolicy.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) : "", permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn ? truncatedISO8061Date(identifier.accessPolicy.startsOn) : "" + startsOn: identifier.accessPolicy.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) : "" }, id: identifier.id }); } - return assertResponse(await this.containerContext.setAccessPolicy({ + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ abortSignal: options.abortSignal, - access: access2, + access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, @@ -66884,7 +72413,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns A new BlobLeaseClient object for managing leases on the container. */ getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } /** * Creates a new block blob, or updates the content of an existing block blob. @@ -66898,7 +72427,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better * performance with concurrency uploading. * - * @see https://docs.microsoft.com/rest/api/storageservices/put-blob + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob * * @param blobName - Name of the block blob to create or update. * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function @@ -66908,10 +72437,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure the Block Blob Upload operation. * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. */ - async uploadBlockBlob(blobName, body2, contentLength2, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body2, contentLength2, updatedOptions); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); return { blockBlobClient, response @@ -66923,14 +72452,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * during garbage collection. Note that in order to delete a blob, you must delete * all of its snapshots. You can delete both at the same time with the Delete * Blob operation. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob * * @param blobName - * @param options - Options to Blob Delete operation. * @returns Block blob deletion response data. */ async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { let blobClient = this.getBlobClient(blobName); if (options.versionId) { blobClient = blobClient.withVersion(options.versionId); @@ -66943,18 +72472,38 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * specified Marker. Use an empty Marker to start enumeration from the beginning. * After getting a segment, process it, and then call listBlobsFlatSegment again * (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Flat Segment operation. */ - async listBlobFlatSegment(marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }) + } + }; return wrappedResponse; }); } @@ -66963,23 +72512,46 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * the specified Marker. Use an empty Marker to start enumeration from the * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment * again (passing the the previously-returned Marker) to get the next segment. - * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs * * @param delimiter - The character or string used to define the virtual hierarchy * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. * @param options - Options to Container List Blob Hierarchy Segment operation. */ - async listBlobHierarchySegment(delimiter2, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter2, Object.assign(Object.assign({ marker: marker2 }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody) + }, + // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata) + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name) + }; + return blobPrefix; + }) + } + }; return wrappedResponse; }); } @@ -66995,44 +72567,26 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker2, options)); - marker2 = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator of {@link BlobItem} objects * * @param options - Options to list blobs operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } } /** * Returns an async iterable iterator to list all the blobs @@ -67040,64 +72594,63 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * * // Gets next marker * let marker = response.continuationToken; - * * // Passing next marker as continuationToken - * * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } * } * ``` * @@ -67105,41 +72658,44 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns An asyncIterableIterator that supports paging. */ listBlobsFlat(options = {}) { - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(updatedOptions); return { /** @@ -67158,7 +72714,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -67175,17 +72734,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list blobs operation. */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter2, marker2, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter2, marker2, options)); - marker2 = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker2); - } - }); + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === void 0) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. @@ -67193,35 +72750,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter2, options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter2, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix2 of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix2)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix + }; } } - }); + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } } /** * Returns an async iterable iterator to list all the blobs by hierarchy. @@ -67229,118 +72773,138 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. * - * Example using `for await` syntax: + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); * + * // Example using `for await` syntax * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; * if (segment.blobPrefixes) { * for (const prefix of segment.blobPrefixes) { * console.log(`\tBlobPrefix: ${prefix.name}`); * } * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { * for (const blob of response.segment.blobItems) { * console.log(`\tBlobItem: name - ${blob.name}`); * } * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } * ``` * * @param delimiter - The character or string used to define the virtual hierarchy * @param options - Options to list blobs operation. */ - listBlobsByHierarchy(delimiter2, options = {}) { - if (delimiter2 === "") { + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { throw new RangeError("delimiter should contain one or more characters"); } - const include2 = []; + const include = []; if (options.includeCopy) { - include2.push("copy"); + include.push("copy"); } if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSnapshots) { - include2.push("snapshots"); + include.push("snapshots"); } if (options.includeVersions) { - include2.push("versions"); + include.push("versions"); } if (options.includeUncommitedBlobs) { - include2.push("uncommittedblobs"); + include.push("uncommittedblobs"); } if (options.includeTags) { - include2.push("tags"); + include.push("tags"); } if (options.includeDeletedWithVersions) { - include2.push("deletedwithversions"); + include.push("deletedwithversions"); } if (options.includeImmutabilityPolicy) { - include2.push("immutabilitypolicy"); + include.push("immutabilitypolicy"); } if (options.includeLegalHold) { - include2.push("legalhold"); + include.push("legalhold"); } if (options.prefix === "") { options.prefix = void 0; } - const updatedOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); - const iter = this.listItemsByHierarchy(delimiter2, updatedOptions); + const updatedOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); return { /** * The next method, part of the iteration protocol @@ -67358,7 +72922,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter2, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions + }); } }; } @@ -67379,23 +72946,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -67415,18 +72986,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -67437,27 +73006,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_3_1) { - e_3 = { error: e_3_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_3) throw e_3.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -67467,53 +73020,54 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example using `for await` syntax: * - * ```js + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax * let i = 1; * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Example using `iter.next()` syntax + * i = 1; * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Example using paging with a marker + * i = 1; * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -67521,11 +73075,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * .findBlobsByTags("tagkey='tagvalue'") * .byPage({ continuationToken: marker, maxPageSize: 10 }); * response = (await iterator.next()).value; - * - * // Prints blob names + * // Prints 10 blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -67537,7 +73090,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -67556,7 +73111,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -67565,14 +73123,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -67584,7 +73142,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; const parsedUrl = new URL(this.url); if (parsedUrl.hostname.split(".")[1] === "blob") { containerName = parsedUrl.pathname.split("/")[1]; - } else if (isIpEndpointStyle(parsedUrl)) { + } else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { containerName = parsedUrl.pathname.split("/")[2]; } else { containerName = parsedUrl.pathname.split("/")[1]; @@ -67604,18 +73162,21 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { return new Promise((resolve6) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve6(appendToURLQuery(this.url, sas)); + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, this.credential).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -67624,45 +73185,78 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas * * @param options - Optional parameters. * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, this.credential).stringToSign; + } + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve6) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).toString(); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options + }, userDelegationKey, this.accountName).stringToSign; } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this container. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } }; + exports2.ContainerClient = ContainerClient; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js +var require_AccountSASPermissions = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASPermissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASPermissions = void 0; var AccountSASPermissions = class _AccountSASPermissions { - constructor() { - this.read = false; - this.write = false; - this.delete = false; - this.deleteVersion = false; - this.list = false; - this.add = false; - this.create = false; - this.update = false; - this.process = false; - this.tag = false; - this.filter = false; - this.setImmutabilityPolicy = false; - this.permanentDelete = false; - } /** * Parse initializes the AccountSASPermissions fields from a string. * @@ -67766,6 +73360,58 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASPermissions; } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; /** * Produces the SAS permissions string for an Azure Storage account. * Call this method to set AccountSASSignatureValues Permissions field. @@ -67773,7 +73419,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Using this method will guarantee the resource types are in * an order accepted by the service. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -67820,12 +73466,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return permissions.join(""); } }; + exports2.AccountSASPermissions = AccountSASPermissions; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js +var require_AccountSASResourceTypes = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASResourceTypes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASResourceTypes = void 0; var AccountSASResourceTypes = class _AccountSASResourceTypes { - constructor() { - this.service = false; - this.container = false; - this.object = false; - } /** * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an * Error if it encounters a character that does not correspond to a valid resource type. @@ -67851,10 +73502,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASResourceTypes; } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; /** * Converts the given resource types to a string. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas * */ toString() { @@ -67871,13 +73534,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return resourceTypes.join(""); } }; + exports2.AccountSASResourceTypes = AccountSASResourceTypes; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js +var require_AccountSASServices = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASServices.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountSASServices = void 0; var AccountSASServices = class _AccountSASServices { - constructor() { - this.blob = false; - this.file = false; - this.queue = false; - this.table = false; - } /** * Creates an {@link AccountSASServices} from the specified services string. This method will throw an * Error if it encounters a character that does not correspond to a valid service. @@ -67906,6 +73573,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } return accountSASServices; } + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; /** * Converts the given services to a string. * @@ -67927,44 +73610,62 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return services.join(""); } }; + exports2.AccountSASServices = AccountSASServices; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js +var require_AccountSASSignatureValues = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/sas/AccountSASSignatureValues.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; + exports2.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASResourceTypes_js_1 = require_AccountSASResourceTypes(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var SasIPRange_js_1 = require_SasIPRange(); + var SASQueryParameters_js_1 = require_SASQueryParameters(); + var constants_js_1 = require_constants10(); + var utils_common_js_1 = require_utils_common(); function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential).sasQueryParameters; } function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version2 = accountSASSignatureValues.version ? accountSASSignatureValues.version : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version2 < "2020-08-04") { + const version = accountSASSignatureValues.version ? accountSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.setImmutabilityPolicy && version < "2020-08-04") { throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.deleteVersion && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version2 < "2019-10-10") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.permanentDelete && version < "2019-10-10") { throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.tag && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version2 < "2019-12-12") { + if (accountSASSignatureValues.permissions && accountSASSignatureValues.permissions.filter && version < "2019-12-12") { throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); } - if (accountSASSignatureValues.encryptionScope && version2 < "2020-12-06") { + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); let stringToSign; - if (version2 >= "2020-12-06") { + if (version >= "2020-12-06") { stringToSign = [ sharedKeyCredential.accountName, parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", "" // Account SAS requires an additional newline character @@ -67975,22 +73676,50 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; parsedPermissions, parsedServices, parsedResourceTypes, - accountSASSignatureValues.startsOn ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version2, + version, "" // Account SAS requires an additional newline character ].join("\n"); } const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); return { - sasQueryParameters: new SASQueryParameters(version2, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, void 0, accountSASSignatureValues.encryptionScope), stringToSign }; } - var BlobServiceClient = class _BlobServiceClient extends StorageClient { + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js +var require_BlobServiceClient = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BlobServiceClient.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.BlobServiceClient = void 0; + var core_auth_1 = require_commonjs7(); + var core_rest_pipeline_1 = require_commonjs6(); + var core_util_1 = require_commonjs4(); + var Pipeline_js_1 = require_Pipeline(); + var ContainerClient_js_1 = require_ContainerClient(); + var utils_common_js_1 = require_utils_common(); + var StorageSharedKeyCredential_js_1 = require_StorageSharedKeyCredential(); + var AnonymousCredential_js_1 = require_AnonymousCredential(); + var utils_common_js_2 = require_utils_common(); + var tracing_js_1 = require_tracing(); + var BlobBatchClient_js_1 = require_BlobBatchClient(); + var StorageClient_js_1 = require_StorageClient(); + var AccountSASPermissions_js_1 = require_AccountSASPermissions(); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + var AccountSASServices_js_1 = require_AccountSASServices(); + var BlobServiceClient = class _BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; /** * * Creates an instance of BlobServiceClient from connection string. @@ -68005,35 +73734,35 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; */ static fromConnectionString(connectionString, options) { options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); } - const pipeline = newPipeline(sharedKeyCredential, options); + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); return new _BlobServiceClient(extractedCreds.url, pipeline); } else { throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); return new _BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url3, credentialOrPipeline, options) { + constructor(url2, credentialOrPipeline, options) { let pipeline; - if (isPipelineLike(credentialOrPipeline)) { + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { pipeline = credentialOrPipeline; - } else if (coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); + } else if (core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential || credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } else { - pipeline = newPipeline(new AnonymousCredential(), options); + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - super(url3, pipeline); + super(url2, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -68044,22 +73773,31 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * Example usage: * - * ```js + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * * const containerClient = blobServiceClient.getContainerClient(""); * ``` */ getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } /** - * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container * * @param containerName - Name of the container to create. * @param options - Options to configure Container Create operation. * @returns Container creation response and the corresponding container client. */ async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); const containerCreateResponse = await containerClient.create(updatedOptions); return { @@ -68076,7 +73814,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @returns Container deletion response. */ async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { const containerClient = this.getContainerClient(containerName); return containerClient.delete(updatedOptions); }); @@ -68090,47 +73828,29 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to configure Container Restore operation. * @returns Container deletion response. */ - async undeleteContainer(deletedContainerName2, deletedContainerVersion2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName2); + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName: deletedContainerName2, - deletedContainerVersion: deletedContainerVersion2, + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, tracingOptions: updatedOptions.tracingOptions })); return { containerClient, containerUndeleteResponse }; }); } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName2, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName2, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } /** * Gets the properties of a storage account’s Blob service, including properties * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * * @param options - Options to the Service Get Properties operation. * @returns Response data for the Service Get Properties operation. */ async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68139,15 +73859,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; /** * Sets properties for a storage account’s Blob service endpoint, including properties * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties * * @param properties - * @param options - Options to the Service Set Properties operation. * @returns Response data for the Service Set Properties operation. */ async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68157,14 +73877,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves statistics related to replication for the Blob service. It is only * available on the secondary location endpoint when read-access geo-redundant * replication is enabled for the storage account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats * * @param options - Options to the Service Get Statistics operation. * @returns Response data for the Service Get Statistics operation. */ async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68175,14 +73895,14 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * for the specified account. * The Get Account Information operation is available on service versions beginning * with version 2018-03-28. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information * * @param options - Options to the Service Get Account Info operation. * @returns Response data for the Service Get Account Info operation. */ async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions })); @@ -68190,7 +73910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } /** * Returns a list of the containers under the specified account. - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2 + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 * * @param marker - A string value that identifies the portion of * the list of containers to be returned with the next listing operation. The @@ -68202,9 +73922,15 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to the Service List Container Segment operation. * @returns Response data for the Service List Container Segment operation. */ - async listContainersSegment(marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker: marker2 }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions + })); }); } /** @@ -68225,23 +73951,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, - marker: marker2, + marker, maxPageSize: options.maxPageSize, tracingOptions: updatedOptions.tracingOptions })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); + const wrappedResponse = { + ...response, + _response: response._response, + // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }) + }; return wrappedResponse; }); } @@ -68261,18 +73991,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to find blobs by tags. */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker2, options = {}) { - let response; - if (!!marker2 || marker2 === void 0) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker2, options)); - response.blobs = response.blobs || []; - marker2 = response.continuationToken; - yield yield tslib.__await(response); - } while (marker2); - } - }); + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === void 0) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } /** * Returns an AsyncIterableIterator for blobs. @@ -68283,27 +74011,11 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * however, only a subset of the OData filter syntax is supported in the Blob service. * @param options - Options to findBlobsByTagsItems. */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_1) throw e_1.error; - } - } - }); + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } /** * Returns an async iterable iterator to find all blobs with specified tag @@ -68311,57 +74023,53 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the blobs in pages. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs * let i = 1; * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the blobs + * i = 1; * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; - * * // Prints 2 blob names * if (response.blobs) { * for (const blob of response.blobs) { * console.log(`Blob ${i++}: ${blob.name}`); * } * } - * * // Gets next marker * let marker = response.continuationToken; * // Passing next marker as continuationToken @@ -68373,7 +74081,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints blob names * if (response.blobs) { * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); + * console.log(`Blob ${i++}: ${blob.name}`); * } * } * ``` @@ -68385,7 +74093,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Options to find blobs by tags. */ findBlobsByTags(tagFilterSqlExpression, options = {}) { - const listSegmentOptions = Object.assign({}, options); + const listSegmentOptions = { + ...options + }; const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); return { /** @@ -68404,7 +74114,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68420,45 +74133,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * items. The marker value is opaque to the client. * @param options - Options to list containers operation. */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker2, options = {}) { - let listContainersSegmentResponse; - if (!!marker2 || marker2 === void 0) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker2, options)); - listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; - marker2 = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker2); - } - }); + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === void 0) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } } /** * Returns an AsyncIterableIterator for Container Items * * @param options - Options to list containers operation. */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker2; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker2, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } catch (e_2_1) { - e_2 = { error: e_2_1 }; - } finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } finally { - if (e_2) throw e_2.error; - } - } - }); + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } } /** * Returns an async iterable iterator to list all the containers @@ -68466,45 +74161,41 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * * .byPage() returns an async iterable iterator to list the containers in pages. * - * Example using `for await` syntax: + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; * - * ```js + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers * let i = 1; * for await (const container of blobServiceClient.listContainers()) { * console.log(`Container ${i++}: ${container.name}`); * } - * ``` * - * Example using `iter.next()`: - * - * ```js - * let i = 1; + * // Use iter.next() to iterate the containers + * i = 1; * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); * } - * ``` * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); * } * } - * ``` * - * Example using paging with a marker: - * - * ```js - * let i = 1; + * // Use paging with a marker + * i = 1; * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); * let response = (await iterator.next()).value; * @@ -68526,7 +74217,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * // Prints 10 container names * if (response.containerItems) { * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); + * console.log(`Container ${i++}: ${container.name}`); * } * } * ``` @@ -68538,17 +74229,20 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (options.prefix === "") { options.prefix = void 0; } - const include2 = []; + const include = []; if (options.includeDeleted) { - include2.push("deleted"); + include.push("deleted"); } if (options.includeMetadata) { - include2.push("metadata"); + include.push("metadata"); } if (options.includeSystem) { - include2.push("system"); + include.push("system"); } - const listSegmentOptions = Object.assign(Object.assign({}, options), include2.length > 0 ? { include: include2 } : {}); + const listSegmentOptions = { + ...options, + ...include.length > 0 ? { include } : {} + }; const iter = this.listItems(listSegmentOptions); return { /** @@ -68567,7 +74261,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Return an AsyncIterableIterator that works a page at a time */ byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions + }); } }; } @@ -68577,16 +74274,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Retrieves a user delegation key for the Blob service. This is only a valid operation when using * bearer token authentication. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key * * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time */ - async getUserDelegationKey(startsOn, expiresOn2, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn2, false) + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false) }, { abortSignal: options.abortSignal, tracingOptions: updatedOptions.tracingOptions @@ -68600,19 +74297,27 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; signedVersion: response.signedVersion, value: response.value }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey + }; return res; }); } /** * Creates a BlobBatchClient object to conduct batch operations. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch * * @returns A new BlobBatchClient object for this service. */ getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -68620,7 +74325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties * and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -68628,21 +74333,22 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateAccountSasUrl(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - const sas = generateAccountSASQueryParameters(Object.assign({ + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); } /** * Only available for BlobServiceClient constructed with a shared key credential. @@ -68650,7 +74356,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. * - * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas * * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. * @param permissions - Specifies the list of permissions to be associated with the SAS. @@ -68658,66 +74364,124 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param options - Optional parameters. * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ - generateSasStringToSign(expiresOn2, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); } - if (expiresOn2 === void 0) { + if (expiresOn === void 0) { const now = /* @__PURE__ */ new Date(); - expiresOn2 = new Date(now.getTime() + 3600 * 1e3); + expiresOn = new Date(now.getTime() + 3600 * 1e3); } - return generateAccountSASQueryParametersInternal(Object.assign({ + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ permissions, - expiresOn: expiresOn2, + expiresOn, resourceTypes, - services: AccountSASServices.parse("b").toString() - }, options), this.credential).stringToSign; + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options + }, this.credential).stringToSign; } }; - exports2.KnownEncryptionAlgorithmType = void 0; - (function(KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; - })(exports2.KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = {})); - Object.defineProperty(exports2, "RestError", { - enumerable: true, - get: function() { - return coreRestPipeline.RestError; - } - }); - exports2.AccountSASPermissions = AccountSASPermissions; - exports2.AccountSASResourceTypes = AccountSASResourceTypes; - exports2.AccountSASServices = AccountSASServices; - exports2.AnonymousCredential = AnonymousCredential; - exports2.AnonymousCredentialPolicy = AnonymousCredentialPolicy; - exports2.AppendBlobClient = AppendBlobClient; - exports2.BaseRequestPolicy = BaseRequestPolicy; - exports2.BlobBatch = BlobBatch; - exports2.BlobBatchClient = BlobBatchClient; - exports2.BlobClient = BlobClient; - exports2.BlobLeaseClient = BlobLeaseClient; - exports2.BlobSASPermissions = BlobSASPermissions; exports2.BlobServiceClient = BlobServiceClient; - exports2.BlockBlobClient = BlockBlobClient; - exports2.ContainerClient = ContainerClient; - exports2.ContainerSASPermissions = ContainerSASPermissions; - exports2.Credential = Credential; - exports2.CredentialPolicy = CredentialPolicy; - exports2.PageBlobClient = PageBlobClient; - exports2.Pipeline = Pipeline; - exports2.SASQueryParameters = SASQueryParameters; - exports2.StorageBrowserPolicy = StorageBrowserPolicy; - exports2.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; - exports2.StorageOAuthScopes = StorageOAuthScopes; - exports2.StorageRetryPolicy = StorageRetryPolicy; - exports2.StorageRetryPolicyFactory = StorageRetryPolicyFactory; - exports2.StorageSharedKeyCredential = StorageSharedKeyCredential; - exports2.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; - exports2.generateAccountSASQueryParameters = generateAccountSASQueryParameters; - exports2.generateBlobSASQueryParameters = generateBlobSASQueryParameters; - exports2.getBlobServiceAccountAudience = getBlobServiceAccountAudience; - exports2.isPipelineLike = isPipelineLike; - exports2.logger = logger; - exports2.newPipeline = newPipeline; + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js +var require_BatchResponse = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/BatchResponse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js +var require_generatedModels = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/generatedModels.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.KnownEncryptionAlgorithmType = void 0; + var KnownEncryptionAlgorithmType; + (function(KnownEncryptionAlgorithmType2) { + KnownEncryptionAlgorithmType2["AES256"] = "AES256"; + })(KnownEncryptionAlgorithmType || (exports2.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); + } +}); + +// node_modules/@azure/storage-blob/dist/commonjs/index.js +var require_commonjs15 = __commonJS({ + "node_modules/@azure/storage-blob/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.logger = exports2.RestError = exports2.BaseRequestPolicy = exports2.StorageOAuthScopes = exports2.newPipeline = exports2.isPipelineLike = exports2.Pipeline = exports2.getBlobServiceAccountAudience = exports2.StorageBlobAudience = exports2.PremiumPageBlobTier = exports2.BlockBlobTier = exports2.generateBlobSASQueryParameters = exports2.generateAccountSASQueryParameters = void 0; + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_rest_pipeline_1 = require_commonjs6(); + Object.defineProperty(exports2, "RestError", { enumerable: true, get: function() { + return core_rest_pipeline_1.RestError; + } }); + tslib_1.__exportStar(require_BlobServiceClient(), exports2); + tslib_1.__exportStar(require_Clients(), exports2); + tslib_1.__exportStar(require_ContainerClient(), exports2); + tslib_1.__exportStar(require_BlobLeaseClient(), exports2); + tslib_1.__exportStar(require_AccountSASPermissions(), exports2); + tslib_1.__exportStar(require_AccountSASResourceTypes(), exports2); + tslib_1.__exportStar(require_AccountSASServices(), exports2); + var AccountSASSignatureValues_js_1 = require_AccountSASSignatureValues(); + Object.defineProperty(exports2, "generateAccountSASQueryParameters", { enumerable: true, get: function() { + return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; + } }); + tslib_1.__exportStar(require_BlobBatch(), exports2); + tslib_1.__exportStar(require_BlobBatchClient(), exports2); + tslib_1.__exportStar(require_BatchResponse(), exports2); + tslib_1.__exportStar(require_BlobSASPermissions(), exports2); + var BlobSASSignatureValues_js_1 = require_BlobSASSignatureValues(); + Object.defineProperty(exports2, "generateBlobSASQueryParameters", { enumerable: true, get: function() { + return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; + } }); + tslib_1.__exportStar(require_StorageBrowserPolicyFactory2(), exports2); + tslib_1.__exportStar(require_ContainerSASPermissions(), exports2); + tslib_1.__exportStar(require_AnonymousCredential(), exports2); + tslib_1.__exportStar(require_Credential(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredential(), exports2); + var models_js_1 = require_models2(); + Object.defineProperty(exports2, "BlockBlobTier", { enumerable: true, get: function() { + return models_js_1.BlockBlobTier; + } }); + Object.defineProperty(exports2, "PremiumPageBlobTier", { enumerable: true, get: function() { + return models_js_1.PremiumPageBlobTier; + } }); + Object.defineProperty(exports2, "StorageBlobAudience", { enumerable: true, get: function() { + return models_js_1.StorageBlobAudience; + } }); + Object.defineProperty(exports2, "getBlobServiceAccountAudience", { enumerable: true, get: function() { + return models_js_1.getBlobServiceAccountAudience; + } }); + var Pipeline_js_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_js_1.Pipeline; + } }); + Object.defineProperty(exports2, "isPipelineLike", { enumerable: true, get: function() { + return Pipeline_js_1.isPipelineLike; + } }); + Object.defineProperty(exports2, "newPipeline", { enumerable: true, get: function() { + return Pipeline_js_1.newPipeline; + } }); + Object.defineProperty(exports2, "StorageOAuthScopes", { enumerable: true, get: function() { + return Pipeline_js_1.StorageOAuthScopes; + } }); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + var RequestPolicy_js_1 = require_RequestPolicy(); + Object.defineProperty(exports2, "BaseRequestPolicy", { enumerable: true, get: function() { + return RequestPolicy_js_1.BaseRequestPolicy; + } }); + tslib_1.__exportStar(require_AnonymousCredentialPolicy(), exports2); + tslib_1.__exportStar(require_CredentialPolicy(), exports2); + tslib_1.__exportStar(require_StorageRetryPolicyFactory(), exports2); + tslib_1.__exportStar(require_StorageSharedKeyCredentialPolicy(), exports2); + tslib_1.__exportStar(require_SASQueryParameters(), exports2); + tslib_1.__exportStar(require_generatedModels(), exports2); + var log_js_1 = require_log5(); + Object.defineProperty(exports2, "logger", { enumerable: true, get: function() { + return log_js_1.logger; + } }); } }); @@ -68802,7 +74566,7 @@ More info on storage limits: https://docs.github.com/en/billing/managing-billing var require_uploadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/uploadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -68815,21 +74579,31 @@ var require_uploadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -68857,9 +74631,10 @@ var require_uploadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); - var storage_blob_1 = require_dist7(); + exports2.UploadProgress = void 0; + exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; + var core14 = __importStar2(require_core()); + var storage_blob_1 = require_commonjs15(); var errors_1 = require_errors2(); var UploadProgress = class { constructor(contentLength) { @@ -68942,15 +74717,17 @@ var require_uploadUtils = __commonJS({ }; exports2.UploadProgress = UploadProgress; function uploadCacheArchiveSDK(signedUploadURL, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const blobClient = new storage_blob_1.BlobClient(signedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); const uploadProgress = new UploadProgress((_a = options === null || options === void 0 ? void 0 : options.archiveSizeBytes) !== null && _a !== void 0 ? _a : 0); const uploadOptions = { blockSize: options === null || options === void 0 ? void 0 : options.uploadChunkSize, concurrency: options === null || options === void 0 ? void 0 : options.uploadConcurrency, + // maximum number of parallel transfer workers maxSingleShotSize: 128 * 1024 * 1024, + // 128 MiB initial transfer size onProgress: uploadProgress.onProgress() }; try { @@ -68969,7 +74746,6 @@ var require_uploadUtils = __commonJS({ } }); } - exports2.uploadCacheArchiveSDK = uploadCacheArchiveSDK; } }); @@ -68977,7 +74753,7 @@ var require_uploadUtils = __commonJS({ var require_requestUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/requestUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -68990,21 +74766,31 @@ var require_requestUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -69032,9 +74818,14 @@ var require_requestUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib3(); + exports2.isSuccessStatusCode = isSuccessStatusCode; + exports2.isServerErrorStatusCode = isServerErrorStatusCode; + exports2.isRetryableStatusCode = isRetryableStatusCode; + exports2.retry = retry3; + exports2.retryTypedResponse = retryTypedResponse; + exports2.retryHttpClientResponse = retryHttpClientResponse; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { @@ -69042,14 +74833,12 @@ var require_requestUtils = __commonJS({ } return statusCode >= 200 && statusCode < 300; } - exports2.isSuccessStatusCode = isSuccessStatusCode; function isServerErrorStatusCode(statusCode) { if (!statusCode) { return true; } return statusCode >= 500; } - exports2.isServerErrorStatusCode = isServerErrorStatusCode; function isRetryableStatusCode(statusCode) { if (!statusCode) { return false; @@ -69061,14 +74850,13 @@ var require_requestUtils = __commonJS({ ]; return retryableStatusCodes.includes(statusCode); } - exports2.isRetryableStatusCode = isRetryableStatusCode; function sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } - function retry3(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { - return __awaiter4(this, void 0, void 0, function* () { + function retry3(name_1, method_1, getStatusCode_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay, onError = void 0) { let errorMessage = ""; let attempt = 1; while (attempt <= maxAttempts) { @@ -69105,9 +74893,8 @@ var require_requestUtils = __commonJS({ throw Error(`${name} failed: ${errorMessage}`); }); } - exports2.retry = retry3; - function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryTypedResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3( name, method, @@ -69131,13 +74918,155 @@ var require_requestUtils = __commonJS({ ); }); } - exports2.retryTypedResponse = retryTypedResponse; - function retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { - return __awaiter4(this, void 0, void 0, function* () { + function retryHttpClientResponse(name_1, method_1) { + return __awaiter2(this, arguments, void 0, function* (name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay2 = constants_1.DefaultRetryDelay) { return yield retry3(name, method, (response) => response.message.statusCode, maxAttempts, delay2); }); } - exports2.retryHttpClientResponse = retryHttpClientResponse; + } +}); + +// node_modules/@azure/abort-controller/dist/index.js +var require_dist4 = __commonJS({ + "node_modules/@azure/abort-controller/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var listenersMap = /* @__PURE__ */ new WeakMap(); + var abortedMap = /* @__PURE__ */ new WeakMap(); + var AbortSignal2 = class _AbortSignal { + constructor() { + this.onabort = null; + listenersMap.set(this, []); + abortedMap.set(this, false); + } + /** + * Status of whether aborted or not. + * + * @readonly + */ + get aborted() { + if (!abortedMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + return abortedMap.get(this); + } + /** + * Creates a new AbortSignal instance that will never be aborted. + * + * @readonly + */ + static get none() { + return new _AbortSignal(); + } + /** + * Added new "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be added + */ + addEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + listeners.push(listener); + } + /** + * Remove "abort" event listener, only support "abort" event. + * + * @param _type - Only support "abort" event + * @param listener - The listener to be removed + */ + removeEventListener(_type, listener) { + if (!listenersMap.has(this)) { + throw new TypeError("Expected `this` to be an instance of AbortSignal."); + } + const listeners = listenersMap.get(this); + const index = listeners.indexOf(listener); + if (index > -1) { + listeners.splice(index, 1); + } + } + /** + * Dispatches a synthetic event to the AbortSignal. + */ + dispatchEvent(_event) { + throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes."); + } + }; + function abortSignal(signal) { + if (signal.aborted) { + return; + } + if (signal.onabort) { + signal.onabort.call(signal); + } + const listeners = listenersMap.get(signal); + if (listeners) { + listeners.slice().forEach((listener) => { + listener.call(signal, { type: "abort" }); + }); + } + abortedMap.set(signal, true); + } + var AbortError = class extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } + }; + var AbortController2 = class { + // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + constructor(parentSignals) { + this._signal = new AbortSignal2(); + if (!parentSignals) { + return; + } + if (!Array.isArray(parentSignals)) { + parentSignals = arguments; + } + for (const parentSignal of parentSignals) { + if (parentSignal.aborted) { + this.abort(); + } else { + parentSignal.addEventListener("abort", () => { + this.abort(); + }); + } + } + } + /** + * The AbortSignal associated with this controller that will signal aborted + * when the abort method is called on this controller. + * + * @readonly + */ + get signal() { + return this._signal; + } + /** + * Signal that any operations passed this controller's associated abort signal + * to cancel any remaining work and throw an `AbortError`. + */ + abort() { + abortSignal(this._signal); + } + /** + * Creates a new AbortSignal instance that will abort after the provided ms. + * @param ms - Elapsed time in milliseconds to trigger an abort. + */ + static timeout(ms) { + const signal = new AbortSignal2(); + const timer = setTimeout(abortSignal, ms, signal); + if (typeof timer.unref === "function") { + timer.unref(); + } + return signal; + } + }; + exports2.AbortController = AbortController2; + exports2.AbortError = AbortError; + exports2.AbortSignal = AbortSignal2; } }); @@ -69145,7 +75074,7 @@ var require_requestUtils = __commonJS({ var require_downloadUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/downloadUtils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69158,21 +75087,31 @@ var require_downloadUtils = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -69200,20 +75139,23 @@ var require_downloadUtils = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib3(); - var storage_blob_1 = require_dist7(); - var buffer = __importStar4(require("buffer")); - var fs13 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); - var utils = __importStar4(require_cacheUtils()); + exports2.DownloadProgress = void 0; + exports2.downloadCacheHttpClient = downloadCacheHttpClient; + exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; + exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var storage_blob_1 = require_commonjs15(); + var buffer = __importStar2(require("buffer")); + var fs13 = __importStar2(require("fs")); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); - var abort_controller_1 = require_dist5(); + var abort_controller_1 = require_dist4(); function pipeResponseToStream(response, output) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const pipeline = util.promisify(stream2.pipeline); yield pipeline(response.message, output); }); @@ -69315,10 +75257,10 @@ var require_downloadUtils = __commonJS({ }; exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const writeStream = fs13.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); - const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { + const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { @@ -69338,17 +75280,16 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClient = downloadCacheHttpClient; function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const archiveDescriptor = yield fs13.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true }); try { - const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter4(this, void 0, void 0, function* () { + const res = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCacheMetadata", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.request("HEAD", archiveLocation, null, {}); })); const lengthHeader = res.message.headers["content-length"]; @@ -69365,7 +75306,7 @@ var require_downloadUtils = __commonJS({ const count = Math.min(blockSize, length - offset); downloads.push({ offset, - promiseGetter: () => __awaiter4(this, void 0, void 0, function* () { + promiseGetter: () => __awaiter2(this, void 0, void 0, function* () { return yield downloadSegmentRetry(httpClient, archiveLocation, offset, count); }) }); @@ -69378,7 +75319,7 @@ var require_downloadUtils = __commonJS({ const progressFn = progress.onProgress(); const activeDownloads = []; let nextDownload; - const waitAndWrite = () => __awaiter4(this, void 0, void 0, function* () { + const waitAndWrite = () => __awaiter2(this, void 0, void 0, function* () { const segment = yield Promise.race(Object.values(activeDownloads)); yield archiveDescriptor.write(segment.buffer, 0, segment.count, segment.offset); actives--; @@ -69402,9 +75343,8 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheHttpClientConcurrent = downloadCacheHttpClientConcurrent; function downloadSegmentRetry(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const retries = 5; let failures = 0; while (true) { @@ -69425,8 +75365,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadSegment(httpClient, archiveLocation, offset, count) { - return __awaiter4(this, void 0, void 0, function* () { - const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + const partRes = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCachePart", () => __awaiter2(this, void 0, void 0, function* () { return yield httpClient.get(archiveLocation, { Range: `bytes=${offset}-${offset + count - 1}` }); @@ -69442,8 +75382,8 @@ var require_downloadUtils = __commonJS({ }); } function downloadCacheStorageSDK(archiveLocation, archivePath, options) { - var _a; - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + var _a; const client = new storage_blob_1.BlockBlobClient(archiveLocation, void 0, { retryOptions: { // Override the timeout used when downloading each 4 MB chunk @@ -69487,8 +75427,7 @@ var require_downloadUtils = __commonJS({ } }); } - exports2.downloadCacheStorageSDK = downloadCacheStorageSDK; - var promiseWithTimeout = (timeoutMs, promise) => __awaiter4(void 0, void 0, void 0, function* () { + var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; const timeoutPromise = new Promise((resolve6) => { timeoutHandle = setTimeout(() => resolve6("timeout"), timeoutMs); @@ -69505,7 +75444,7 @@ var require_downloadUtils = __commonJS({ var require_options = __commonJS({ "node_modules/@actions/cache/lib/options.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69518,23 +75457,34 @@ var require_options = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + exports2.getUploadOptions = getUploadOptions; + exports2.getDownloadOptions = getDownloadOptions; + var core14 = __importStar2(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -69559,7 +75509,6 @@ var require_options = __commonJS({ core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } - exports2.getUploadOptions = getUploadOptions; function getDownloadOptions(copy) { const result = { useAzureSdk: false, @@ -69601,7 +75550,6 @@ var require_options = __commonJS({ core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } - exports2.getDownloadOptions = getDownloadOptions; } }); @@ -69610,7 +75558,9 @@ var require_config = __commonJS({ "node_modules/@actions/cache/lib/internal/config.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCacheServiceURL = exports2.getCacheServiceVersion = exports2.isGhes = void 0; + exports2.isGhes = isGhes; + exports2.getCacheServiceVersion = getCacheServiceVersion; + exports2.getCacheServiceURL = getCacheServiceURL; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -69619,13 +75569,11 @@ var require_config = __commonJS({ const isLocalHost = hostname.endsWith(".LOCALHOST"); return !isGitHubHost && !isGheHost && !isLocalHost; } - exports2.isGhes = isGhes; function getCacheServiceVersion() { if (isGhes()) return "v1"; return process.env["ACTIONS_CACHE_SERVICE_V2"] ? "v2" : "v1"; } - exports2.getCacheServiceVersion = getCacheServiceVersion; function getCacheServiceURL() { const version = getCacheServiceVersion(); switch (version) { @@ -69637,7 +75585,6 @@ var require_config = __commonJS({ throw new Error(`Unsupported cache service version: ${version}`); } } - exports2.getCacheServiceURL = getCacheServiceURL; } }); @@ -69646,7 +75593,7 @@ var require_package2 = __commonJS({ "node_modules/@actions/cache/package.json"(exports2, module2) { module2.exports = { name: "@actions/cache", - version: "4.1.0", + version: "5.0.1", preview: true, description: "Actions cache lib", keywords: [ @@ -69683,22 +75630,26 @@ var require_package2 = __commonJS({ url: "https://github.com/actions/toolkit/issues" }, dependencies: { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", "@protobuf-ts/runtime-rpc": "^2.11.1", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", semver: "^6.3.1" }, devDependencies: { - "@types/node": "^22.13.9", + "@types/node": "^24.1.0", "@types/semver": "^6.0.0", "@protobuf-ts/plugin": "^2.9.4", typescript: "^5.2.2" + }, + overrides: { + "uri-js": "npm:uri-js-replace@^1.0.1", + "node-fetch": "^3.3.2" } }; } @@ -69709,12 +75660,11 @@ var require_user_agent = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/user-agent.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUserAgentString = void 0; + exports2.getUserAgentString = getUserAgentString; var packageJson = require_package2(); function getUserAgentString() { return `@actions/cache-${packageJson.version}`; } - exports2.getUserAgentString = getUserAgentString; } }); @@ -69722,7 +75672,7 @@ var require_user_agent = __commonJS({ var require_cacheHttpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheHttpClient.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -69735,21 +75685,31 @@ var require_cacheHttpClient = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -69777,13 +75737,16 @@ var require_cacheHttpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); - var http_client_1 = require_lib3(); - var auth_1 = require_auth2(); - var fs13 = __importStar4(require("fs")); + exports2.getCacheEntry = getCacheEntry; + exports2.downloadCache = downloadCache; + exports2.reserveCache = reserveCache; + exports2.saveCache = saveCache3; + var core14 = __importStar2(require_core()); + var http_client_1 = require_lib(); + var auth_1 = require_auth(); + var fs13 = __importStar2(require("fs")); var url_1 = require("url"); - var utils = __importStar4(require_cacheUtils()); + var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); var downloadUtils_1 = require_downloadUtils(); var options_1 = require_options(); @@ -69816,11 +75779,11 @@ var require_cacheHttpClient = __commonJS({ return new http_client_1.HttpClient((0, user_agent_1.getUserAgentString)(), [bearerCredentialHandler], getRequestOptions()); } function getCacheEntry(keys, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `cache?keys=${encodeURIComponent(keys.join(","))}&version=${version}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("getCacheEntry", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { @@ -69843,11 +75806,10 @@ var require_cacheHttpClient = __commonJS({ return cacheResult; }); } - exports2.getCacheEntry = getCacheEntry; function printCachesListForDiagnostics(key, httpClient, version) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const resource = `caches?key=${encodeURIComponent(key)}`; - const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("listCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 200) { @@ -69864,7 +75826,7 @@ Other caches with similar key:`); }); } function downloadCache(archiveLocation, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const archiveUrl = new url_1.URL(archiveLocation); const downloadOptions = (0, options_1.getDownloadOptions)(options); if (archiveUrl.hostname.endsWith(".blob.core.windows.net")) { @@ -69880,9 +75842,8 @@ Other caches with similar key:`); } }); } - exports2.downloadCache = downloadCache; function reserveCache(key, paths, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const httpClient = createHttpClient(); const version = utils.getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const reserveCacheRequest = { @@ -69890,24 +75851,23 @@ Other caches with similar key:`); version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter4(this, void 0, void 0, function* () { + const response = yield (0, requestUtils_1.retryTypedResponse)("reserveCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl("caches"), reserveCacheRequest); })); return response; }); } - exports2.reserveCache = reserveCache; function getContentRange(start, end) { return `bytes ${start}-${end}/*`; } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) }; - const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter4(this, void 0, void 0, function* () { + const uploadChunkResponse = yield (0, requestUtils_1.retryHttpClientResponse)(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter2(this, void 0, void 0, function* () { return httpClient.sendStream("PATCH", resourceUrl, openStream(), additionalHeaders); })); if (!(0, requestUtils_1.isSuccessStatusCode)(uploadChunkResponse.message.statusCode)) { @@ -69916,7 +75876,7 @@ Other caches with similar key:`); }); } function uploadFile(httpClient, cacheId, archivePath, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); const fd = fs13.openSync(archivePath, "r"); @@ -69927,7 +75887,7 @@ Other caches with similar key:`); core14.debug("Awaiting all uploads"); let offset = 0; try { - yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { + yield Promise.all(parallelUploads.map(() => __awaiter2(this, void 0, void 0, function* () { while (offset < fileSize) { const chunkSize = Math.min(fileSize - offset, maxChunkSize); const start = offset; @@ -69950,15 +75910,15 @@ Other caches with similar key:`); }); } function commitCache(httpClient, cacheId, filesize) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commitCacheRequest = { size: filesize }; - return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter4(this, void 0, void 0, function* () { + return yield (0, requestUtils_1.retryTypedResponse)("commitCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest); })); }); } function saveCache3(cacheId, archivePath, signedUploadURL, options) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { if (!signedUploadURL) { @@ -69980,7 +75940,6 @@ Other caches with similar key:`); } }); } - exports2.saveCache = saveCache3; } }); @@ -71575,26 +77534,26 @@ var require_reflection_json_reader = __commonJS({ const fieldObj = target[localName]; for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) { this.assert(jsonObjValue !== null, field.name + " map value", null); - let val2; + let val; switch (field.V.kind) { case "message": - val2 = field.V.T().internalJsonRead(jsonObjValue, options); + val = field.V.T().internalJsonRead(jsonObjValue, options); break; case "enum": - val2 = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); + val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name); break; } - this.assert(val2 !== void 0, field.name + " map value", jsonObjValue); + this.assert(val !== void 0, field.name + " map value", jsonObjValue); let key = jsonObjKey; if (field.K == reflection_info_1.ScalarType.BOOL) key = key == "true" ? true : key == "false" ? false : key; key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString(); - fieldObj[key] = val2; + fieldObj[key] = val; } } else if (field.repeat) { if (jsonValue === null) @@ -71603,22 +77562,22 @@ var require_reflection_json_reader = __commonJS({ const fieldArr = target[localName]; for (const jsonItem of jsonValue) { this.assert(jsonItem !== null, field.name, null); - let val2; + let val; switch (field.kind) { case "message": - val2 = field.T().internalJsonRead(jsonItem, options); + val = field.T().internalJsonRead(jsonItem, options); break; case "enum": - val2 = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); - if (val2 === false) + val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields); + if (val === false) continue; break; case "scalar": - val2 = this.scalar(jsonItem, field.T, field.L, field.name); + val = this.scalar(jsonItem, field.T, field.L, field.name); break; } - this.assert(val2 !== void 0, field.name, jsonValue); - fieldArr.push(val2); + this.assert(val !== void 0, field.name, jsonValue); + fieldArr.push(val); } } else { switch (field.kind) { @@ -71632,10 +77591,10 @@ var require_reflection_json_reader = __commonJS({ case "enum": if (jsonValue === null) continue; - let val2 = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); - if (val2 === false) + let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields); + if (val === false) continue; - target[localName] = val2; + target[localName] = val; break; case "scalar": if (jsonValue === null) @@ -71840,26 +77799,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.V.kind) { case "scalar": for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.scalar(field.V.T, entryValue, field.name, false, true); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.scalar(field.V.T, entryValue, field.name, false, true); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "message": const messageType = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { - const val2 = this.message(messageType, entryValue, field.name, options); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.message(messageType, entryValue, field.name, options); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; case "enum": const enumInfo = field.V.T(); for (const [entryKey, entryValue] of Object.entries(value)) { assert_1.assert(entryValue === void 0 || typeof entryValue == "number"); - const val2 = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonObj[entryKey.toString()] = val2; + const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonObj[entryKey.toString()] = val; } break; } @@ -71871,26 +77830,26 @@ var require_reflection_json_writer = __commonJS({ switch (field.kind) { case "scalar": for (let i = 0; i < value.length; i++) { - const val2 = this.scalar(field.T, value[i], field.name, field.opt, true); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.scalar(field.T, value[i], field.name, field.opt, true); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "enum": const enumInfo = field.T(); for (let i = 0; i < value.length; i++) { assert_1.assert(value[i] === void 0 || typeof value[i] == "number"); - const val2 = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; case "message": const messageType = field.T(); for (let i = 0; i < value.length; i++) { - const val2 = this.message(messageType, value[i], field.name, options); - assert_1.assert(val2 !== void 0); - jsonArr.push(val2); + const val = this.message(messageType, value[i], field.name, options); + assert_1.assert(val !== void 0); + jsonArr.push(val); } break; } @@ -72140,7 +78099,7 @@ var require_reflection_binary_reader = __commonJS({ let length = reader.uint32(); let end = reader.pos + length; let key = void 0; - let val2 = void 0; + let val = void 0; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { @@ -72153,13 +78112,13 @@ var require_reflection_binary_reader = __commonJS({ case 2: switch (field.V.kind) { case "scalar": - val2 = this.scalar(reader, field.V.T, field.V.L); + val = this.scalar(reader, field.V.T, field.V.L); break; case "enum": - val2 = reader.int32(); + val = reader.int32(); break; case "message": - val2 = field.V.T().internalBinaryRead(reader, reader.uint32(), options); + val = field.V.T().internalBinaryRead(reader, reader.uint32(), options); break; } break; @@ -72171,19 +78130,19 @@ var require_reflection_binary_reader = __commonJS({ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K); key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw; } - if (val2 === void 0) + if (val === void 0) switch (field.V.kind) { case "scalar": - val2 = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); + val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L); break; case "enum": - val2 = 0; + val = 0; break; case "message": - val2 = field.V.T().create(); + val = field.V.T().create(); break; } - return [key, val2]; + return [key, val]; } scalar(reader, type2, longType) { switch (type2) { @@ -72288,8 +78247,8 @@ var require_reflection_binary_writer = __commonJS({ break; case "map": assert_1.assert(typeof value == "object" && value !== null); - for (const [key, val2] of Object.entries(value)) - this.mapEntry(writer, options, field, key, val2); + for (const [key, val] of Object.entries(value)) + this.mapEntry(writer, options, field, key, val); break; } } @@ -72859,18 +78818,18 @@ var require_enum_object = __commonJS({ } exports2.listEnumValues = listEnumValues; function listEnumNames(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.name); + return listEnumValues(enumObject).map((val) => val.name); } exports2.listEnumNames = listEnumNames; function listEnumNumbers(enumObject) { - return listEnumValues(enumObject).map((val2) => val2.number).filter((num, index, arr) => arr.indexOf(num) == index); + return listEnumValues(enumObject).map((val) => val.number).filter((num, index, arr) => arr.indexOf(num) == index); } exports2.listEnumNumbers = listEnumNumbers; } }); // node_modules/@protobuf-ts/runtime/build/commonjs/index.js -var require_commonjs11 = __commonJS({ +var require_commonjs16 = __commonJS({ "node_modules/@protobuf-ts/runtime/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -73061,7 +79020,7 @@ var require_reflection_info2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readServiceOption = exports2.readMethodOption = exports2.readMethodOptions = exports2.normalizeMethodInfo = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function normalizeMethodInfo(method, service) { var _a, _b, _c; let m = method; @@ -73170,7 +79129,7 @@ var require_rpc_options = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.mergeRpcOptions = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function mergeRpcOptions(defaults, options) { if (!options) return defaults; @@ -73178,7 +79137,7 @@ var require_rpc_options = __commonJS({ copy(defaults, o); copy(options, o); for (let key of Object.keys(options)) { - let val2 = options[key]; + let val = options[key]; switch (key) { case "jsonOptions": o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions); @@ -73192,7 +79151,7 @@ var require_rpc_options = __commonJS({ copy(options.meta, o.meta); break; case "interceptors": - o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val2) : val2.concat(); + o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat(); break; } } @@ -73284,9 +79243,9 @@ var require_deferred = __commonJS({ /** * Resolve the promise. Ignore if not pending. */ - resolvePending(val2) { + resolvePending(val) { if (this._state === DeferredState.PENDING) - this.resolve(val2); + this.resolve(val); } /** * Reject the promise. Ignore if not pending. @@ -73307,7 +79266,7 @@ var require_rpc_output_stream = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RpcOutputStreamController = void 0; var deferred_1 = require_deferred(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var RpcOutputStreamController = class { constructor() { this._lis = { @@ -73456,7 +79415,7 @@ var require_rpc_output_stream = __commonJS({ var require_unary_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/unary-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -73503,7 +79462,7 @@ var require_unary_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -73525,7 +79484,7 @@ var require_unary_call = __commonJS({ var require_server_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/server-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -73574,7 +79533,7 @@ var require_server_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -73595,7 +79554,7 @@ var require_server_streaming_call = __commonJS({ var require_client_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/client-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -73643,7 +79602,7 @@ var require_client_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]); return { method: this.method, @@ -73664,7 +79623,7 @@ var require_client_streaming_call = __commonJS({ var require_duplex_streaming_call = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/duplex-streaming-call.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -73712,7 +79671,7 @@ var require_duplex_streaming_call = __commonJS({ return this.promiseFinished().then((value) => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, (reason) => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason)); } promiseFinished() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]); return { method: this.method, @@ -73732,7 +79691,7 @@ var require_duplex_streaming_call = __commonJS({ var require_test_transport = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/test-transport.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -73762,7 +79721,7 @@ var require_test_transport = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TestTransport = void 0; var rpc_error_1 = require_rpc_error(); - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); var rpc_output_stream_1 = require_rpc_output_stream(); var rpc_options_1 = require_rpc_options(); var unary_call_1 = require_unary_call(); @@ -73836,7 +79795,7 @@ var require_test_transport = __commonJS({ * not reject. If it does, code is broken. */ streamResponses(method, stream2, abort) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const messages = []; if (this.data.response === void 0) { messages.push(method.O.create()); @@ -74006,7 +79965,7 @@ var require_rpc_interceptor = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.stackDuplexStreamingInterceptors = exports2.stackClientStreamingInterceptors = exports2.stackServerStreamingInterceptors = exports2.stackUnaryInterceptors = exports2.stackIntercept = void 0; - var runtime_1 = require_commonjs11(); + var runtime_1 = require_commonjs16(); function stackIntercept(kind, transport, method, options, input) { var _a, _b, _c, _d; if (kind == "unary") { @@ -74130,7 +80089,7 @@ var require_server_call_context = __commonJS({ }); // node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js -var require_commonjs12 = __commonJS({ +var require_commonjs17 = __commonJS({ "node_modules/@protobuf-ts/runtime-rpc/build/commonjs/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -74216,11 +80175,11 @@ var require_cachescope = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheScope = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var CacheScope$Type = class extends runtime_5.MessageType { constructor() { super("github.actions.results.entities.v1.CacheScope", [ @@ -74292,11 +80251,11 @@ var require_cachemetadata = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheMetadata = void 0; - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachescope_1 = require_cachescope(); var CacheMetadata$Type = class extends runtime_5.MessageType { constructor() { @@ -74358,17 +80317,17 @@ var require_cachemetadata = __commonJS({ }); // node_modules/@actions/cache/lib/generated/results/api/v1/cache.js -var require_cache2 = __commonJS({ +var require_cache3 = __commonJS({ "node_modules/@actions/cache/lib/generated/results/api/v1/cache.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheService = exports2.GetCacheEntryDownloadURLResponse = exports2.GetCacheEntryDownloadURLRequest = exports2.FinalizeCacheEntryUploadResponse = exports2.FinalizeCacheEntryUploadRequest = exports2.CreateCacheEntryResponse = exports2.CreateCacheEntryRequest = void 0; - var runtime_rpc_1 = require_commonjs12(); - var runtime_1 = require_commonjs11(); - var runtime_2 = require_commonjs11(); - var runtime_3 = require_commonjs11(); - var runtime_4 = require_commonjs11(); - var runtime_5 = require_commonjs11(); + var runtime_rpc_1 = require_commonjs17(); + var runtime_1 = require_commonjs16(); + var runtime_2 = require_commonjs16(); + var runtime_3 = require_commonjs16(); + var runtime_4 = require_commonjs16(); + var runtime_5 = require_commonjs16(); var cachemetadata_1 = require_cachemetadata(); var CreateCacheEntryRequest$Type = class extends runtime_5.MessageType { constructor() { @@ -74843,7 +80802,7 @@ var require_cache_twirp_client = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CacheServiceClientProtobuf = exports2.CacheServiceClientJSON = void 0; - var cache_1 = require_cache2(); + var cache_1 = require_cache3(); var CacheServiceClientJSON = class { constructor(rpc) { this.rpc = rpc; @@ -74911,11 +80870,12 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/@actions/cache/lib/internal/shared/util.js -var require_util10 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.maskSecretUrls = exports2.maskSigUrl = void 0; + exports2.maskSigUrl = maskSigUrl; + exports2.maskSecretUrls = maskSecretUrls; var core_1 = require_core(); function maskSigUrl(url2) { if (!url2) @@ -74931,7 +80891,6 @@ var require_util10 = __commonJS({ (0, core_1.debug)(`Failed to parse URL: ${url2} ${error3 instanceof Error ? error3.message : String(error3)}`); } } - exports2.maskSigUrl = maskSigUrl; function maskSecretUrls(body) { if (typeof body !== "object" || body === null) { (0, core_1.debug)("body is not an object or is null"); @@ -74944,7 +80903,6 @@ var require_util10 = __commonJS({ maskSigUrl(body.signed_download_url); } } - exports2.maskSecretUrls = maskSecretUrls; } }); @@ -74952,7 +80910,7 @@ var require_util10 = __commonJS({ var require_cacheTwirpClient = __commonJS({ "node_modules/@actions/cache/lib/internal/shared/cacheTwirpClient.js"(exports2) { "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -74980,16 +80938,16 @@ var require_cacheTwirpClient = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.internalCacheTwirpClient = void 0; + exports2.internalCacheTwirpClient = internalCacheTwirpClient; var core_1 = require_core(); var user_agent_1 = require_user_agent(); var errors_1 = require_errors2(); var config_1 = require_config(); var cacheUtils_1 = require_cacheUtils(); - var auth_1 = require_auth2(); - var http_client_1 = require_lib3(); + var auth_1 = require_auth(); + var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util10(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -75013,14 +80971,14 @@ var require_cacheTwirpClient = __commonJS({ // This function satisfies the Rpc interface. It is compatible with the JSON // JSON generated client. request(service, method, contentType, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { 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* () { + const { body } = yield this.retryableRequest(() => __awaiter2(this, void 0, void 0, function* () { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; @@ -75030,7 +80988,7 @@ var require_cacheTwirpClient = __commonJS({ }); } retryableRequest(operation) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 0; let errorMessage = ""; let rawBody = ""; @@ -75101,7 +81059,7 @@ var require_cacheTwirpClient = __commonJS({ return retryableStatusCodes.includes(statusCode); } sleep(milliseconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } @@ -75121,7 +81079,6 @@ var require_cacheTwirpClient = __commonJS({ const client = new CacheServiceClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier); return new cache_twirp_client_1.CacheServiceClientJSON(client); } - exports2.internalCacheTwirpClient = internalCacheTwirpClient; } }); @@ -75129,7 +81086,7 @@ var require_cacheTwirpClient = __commonJS({ var require_tar = __commonJS({ "node_modules/@actions/cache/lib/internal/tar.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -75142,21 +81099,31 @@ var require_tar = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -75184,16 +81151,18 @@ var require_tar = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createTar = exports2.extractTar = exports2.listTar = void 0; + exports2.listTar = listTar; + exports2.extractTar = extractTar2; + exports2.createTar = createTar; var exec_1 = require_exec(); - var io6 = __importStar4(require_io3()); + var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path12 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); + var path12 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { switch (process.platform) { case "win32": { const gnuTar = yield utils.getGnuTarPathOnWindows(); @@ -75225,8 +81194,8 @@ var require_tar = __commonJS({ }; }); } - function getTarArgs(tarPath, compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getTarArgs(tarPath_1, compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (tarPath, compressionMethod, type2, archivePath = "") { const args = [`"${tarPath.path}"`]; const cacheFileName = utils.getCacheFileName(compressionMethod); const tarFile = "cache.tar"; @@ -75256,8 +81225,8 @@ var require_tar = __commonJS({ return args; }); } - function getCommands(compressionMethod, type2, archivePath = "") { - return __awaiter4(this, void 0, void 0, function* () { + function getCommands(compressionMethod_1, type_1) { + return __awaiter2(this, arguments, void 0, function* (compressionMethod, type2, archivePath = "") { let args; const tarPath = yield getTarPath(); const tarArgs = yield getTarArgs(tarPath, compressionMethod, type2, archivePath); @@ -75279,7 +81248,7 @@ var require_tar = __commonJS({ return (_a = process.env["GITHUB_WORKSPACE"]) !== null && _a !== void 0 ? _a : process.cwd(); } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: @@ -75303,7 +81272,7 @@ var require_tar = __commonJS({ }); } function getCompressionProgram(tarPath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const cacheFileName = utils.getCacheFileName(compressionMethod); const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (compressionMethod) { @@ -75328,7 +81297,7 @@ var require_tar = __commonJS({ }); } function execCommands(commands, cwd) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { for (const command of commands) { try { yield (0, exec_1.exec)(command, void 0, { @@ -75342,37 +81311,34 @@ var require_tar = __commonJS({ }); } function listTar(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const commands = yield getCommands(compressionMethod, "list", archivePath); yield execCommands(commands); }); } - exports2.listTar = listTar; function extractTar2(archivePath, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const workingDirectory = getWorkingDirectory(); yield io6.mkdirP(workingDirectory); const commands = yield getCommands(compressionMethod, "extract", archivePath); yield execCommands(commands); }); } - exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, fs_1.writeFileSync)(path12.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); } - exports2.createTar = createTar; } }); // node_modules/@actions/cache/lib/cache.js -var require_cache3 = __commonJS({ +var require_cache4 = __commonJS({ "node_modules/@actions/cache/lib/cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -75385,21 +81351,31 @@ var require_cache3 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -75427,15 +81403,18 @@ var require_cache3 = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); - var path12 = __importStar4(require("path")); - var utils = __importStar4(require_cacheUtils()); - var cacheHttpClient = __importStar4(require_cacheHttpClient()); - var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); + exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; + exports2.isFeatureAvailable = isFeatureAvailable; + exports2.restoreCache = restoreCache3; + exports2.saveCache = saveCache3; + var core14 = __importStar2(require_core()); + var path12 = __importStar2(require("path")); + var utils = __importStar2(require_cacheUtils()); + var cacheHttpClient = __importStar2(require_cacheHttpClient()); + var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var http_client_1 = require_lib3(); + var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { super(message); @@ -75484,9 +81463,8 @@ var require_cache3 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - exports2.isFeatureAvailable = isFeatureAvailable; - function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -75499,9 +81477,8 @@ var require_cache3 = __commonJS({ } }); } - exports2.restoreCache = restoreCache3; - function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV1(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; core14.debug("Resolved Keys:"); @@ -75558,8 +81535,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function restoreCacheV2(paths_1, primaryKey_1, restoreKeys_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; @@ -75630,8 +81607,8 @@ var require_cache3 = __commonJS({ return void 0; }); } - function saveCache3(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCache3(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); @@ -75645,10 +81622,9 @@ var require_cache3 = __commonJS({ } }); } - exports2.saveCache = saveCache3; - function saveCacheV1(paths, key, options, enableCrossOsArchive = false) { - var _a, _b, _c, _d, _e; - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV1(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { + var _a, _b, _c, _d, _e; const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); @@ -75709,8 +81685,8 @@ var require_cache3 = __commonJS({ return cacheId; }); } - function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { - return __awaiter4(this, void 0, void 0, function* () { + function saveCacheV2(paths_1, key_1, options_1) { + return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); const compressionMethod = yield utils.getCompressionMethod(); const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); @@ -76110,8 +82086,8 @@ var require_helpers3 = __commonJS({ } return decimalPlaces; }; - exports2.isSchema = function isSchema(val2) { - return typeof val2 === "object" && val2 || typeof val2 === "boolean"; + exports2.isSchema = function isSchema(val) { + return typeof val === "object" && val || typeof val === "boolean"; }; } }); @@ -76853,7 +82829,7 @@ var require_scan = __commonJS({ }); // node_modules/jsonschema/lib/validator.js -var require_validator2 = __commonJS({ +var require_validator = __commonJS({ "node_modules/jsonschema/lib/validator.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -77079,7 +83055,7 @@ var require_validator2 = __commonJS({ var require_lib4 = __commonJS({ "node_modules/jsonschema/lib/index.js"(exports2, module2) { "use strict"; - var Validator3 = module2.exports.Validator = require_validator2(); + var Validator3 = module2.exports.Validator = require_validator(); module2.exports.ValidatorResult = require_helpers3().ValidatorResult; module2.exports.ValidatorResultError = require_helpers3().ValidatorResultError; module2.exports.ValidationError = require_helpers3().ValidationError; @@ -77093,432 +83069,43 @@ var require_lib4 = __commonJS({ } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js -var require_io_util4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js +var require_utils8 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/utils.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; - exports2.IS_WINDOWS = process.platform === "win32"; - exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs13.constants.O_RDONLY; - function exists(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { - return __awaiter4(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory; - function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted; - function tryGetExecutablePath(filePath, extensions) { - return __awaiter4(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path12.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path12.dirname(filePath); - const upperName = path12.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); + } else if (typeof input === "string" || input instanceof String) { + return input; } - return p.replace(/\/\/+/g, "/"); + return JSON.stringify(input); } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + exports2.toCommandValue = toCommandValue; + function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; + exports2.toCommandProperties = toCommandProperties; } }); -// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js -var require_io4 = __commonJS({ - "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js +var require_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/command.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); - } - __setModuleDefault4(result, mod); - return result; - }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; - var assert_1 = require("assert"); - var path12 = __importStar4(require("path")); - var ioUtil = __importStar4(require_io_util4()); - function cp(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path12.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter4(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path12.join(dest, path12.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path12.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter4(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter4(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which6(tool, check) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which6(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which6; - function findInPath(tool) { - return __awaiter4(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path12.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path12.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter4(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile(srcFile, destFile, force) { - return __awaiter4(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/tool-cache/lib/manifest.js -var require_manifest = __commonJS({ - "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77531,125 +83118,137 @@ var require_manifest = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); + } + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js +var require_file_command3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; - var semver8 = __importStar4(require_semver2()); - var core_1 = require_core(); - var os3 = require("os"); - var cp = require("child_process"); - var fs13 = require("fs"); - function _findMatch(versionSpec, stable, candidates, archFilter) { - return __awaiter4(this, void 0, void 0, function* () { - const platFilter = os3.platform(); - let result; - let match; - let file; - for (const candidate of candidates) { - const version = candidate.version; - (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); - if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { - file = candidate.files.find((item) => { - (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); - let chk = item.arch === archFilter && item.platform === platFilter; - if (chk && item.platform_version) { - const osVersion = module2.exports._getOsVersion(); - if (osVersion === item.platform_version) { - chk = true; - } else { - chk = semver8.satisfies(osVersion, item.platform_version); - } - } - return chk; - }); - if (file) { - (0, core_1.debug)(`matched ${candidate.version}`); - match = candidate; - break; - } - } - } - if (match && file) { - result = Object.assign({}, match); - result.files = [file]; - } - return result; + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar2(require("crypto")); + var fs13 = __importStar2(require("fs")); + var os3 = __importStar2(require("os")); + var utils_1 = require_utils8(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs13.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs13.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" }); } - exports2._findMatch = _findMatch; - function _getOsVersion() { - const plat = os3.platform(); - let version = ""; - if (plat === "darwin") { - version = cp.execSync("sw_vers -productVersion").toString(); - } else if (plat === "linux") { - const lsbContents = module2.exports._readLinuxVersionFile(); - if (lsbContents) { - const lines = lsbContents.split("\n"); - for (const line of lines) { - const parts = line.split("="); - if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { - version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); - break; - } - } - } + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - return version; - } - exports2._getOsVersion = _getOsVersion; - function _readLinuxVersionFile() { - const lsbReleaseFile = "/etc/lsb-release"; - const osReleaseFile = "/etc/os-release"; - let contents = ""; - if (fs13.existsSync(lsbReleaseFile)) { - contents = fs13.readFileSync(lsbReleaseFile).toString(); - } else if (fs13.existsSync(osReleaseFile)) { - contents = fs13.readFileSync(osReleaseFile).toString(); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return contents; + return `${key}<<${delimiter}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - exports2._readLinuxVersionFile = _readLinuxVersionFile; + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } }); @@ -77739,7 +83338,7 @@ var require_proxy4 = __commonJS({ var require_lib5 = __commonJS({ "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -77752,21 +83351,21 @@ var require_lib5 = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -77795,10 +83394,10 @@ var require_lib5 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy4()); - var tunnel = __importStar4(require_tunnel2()); + var http = __importStar2(require("http")); + var https2 = __importStar2(require("https")); + var pm = __importStar2(require_proxy4()); + var tunnel = __importStar2(require_tunnel2()); var undici_1 = require_undici(); var HttpCodes; (function(HttpCodes2) { @@ -77873,8 +83472,8 @@ var require_lib5 = __commonJS({ this.message = message; } readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); @@ -77886,8 +83485,8 @@ var require_lib5 = __commonJS({ }); } readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); @@ -77944,42 +83543,42 @@ var require_lib5 = __commonJS({ } } options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream2, additionalHeaders); }); } @@ -77988,14 +83587,14 @@ var require_lib5 = __commonJS({ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78004,7 +83603,7 @@ var require_lib5 = __commonJS({ }); } putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78013,7 +83612,7 @@ var require_lib5 = __commonJS({ }); } patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); @@ -78027,7 +83626,7 @@ var require_lib5 = __commonJS({ * Prefer get, del, post and patch */ request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } @@ -78101,7 +83700,7 @@ var require_lib5 = __commonJS({ * @param data */ requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { @@ -78288,15 +83887,15 @@ var require_lib5 = __commonJS({ return proxyAgent; } _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -78354,11 +83953,507 @@ var require_lib5 = __commonJS({ } }); -// node_modules/@actions/tool-cache/lib/retry-helper.js -var require_retry_helper = __commonJS({ - "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { +// node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js +var require_auth3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/http-client/lib/auth.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error("The request has no headers"); + } + options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter2(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib5(); + var auth_1 = require_auth3(); + var core_1 = require_core3(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; + if (!token) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; + if (!runtimeUrl) { + throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter2(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error3) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error3.statusCode} + + Error Message: ${error3.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter2(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error3) { + throw new Error(`Error message: ${error3.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js +var require_summary3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = require("os"); + var fs_1 = require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter2(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter2(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter2(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js +var require_path_utils3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78371,21 +84466,1569 @@ var require_retry_helper = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path12 = __importStar2(require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); + } + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); + } + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path12.sep); + } + exports2.toPlatformPath = toPlatformPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs13 = __importStar2(require("fs")); + var path12 = __importStar2(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs13.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter2(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter2(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path12.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path12.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path12 = __importStar2(require("path")); + var ioUtil = __importStar2(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path12.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter2(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path12.join(dest, path12.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path12.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter2(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter2(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter2(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path12.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path12.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter2(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter2(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar2(require("os")); + var events = __importStar2(require("events")); + var child = __importStar2(require("child_process")); + var path12 = __importStar2(require("path")); + var io6 = __importStar2(require_io3()); + var ioUtil = __importStar2(require_io_util3()); + var timers_1 = require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner6 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end) { + return str2.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter2(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + } + this.toolPath = yield io6.which(this.toolPath, true); + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error3, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error3) { + reject(error3); + } else { + resolve6(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); + } + }; + exports2.ToolRunner = ToolRunner6; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); + } + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error3; + if (this.processExited) { + if (this.processError) { + error3 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error3 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error3 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error3, this.processExitCode); + } + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); + } + }; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js +var require_exec3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar2(require_toolrunner3()); + function exec(commandLine, args, options) { + return __awaiter2(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec; + function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter2(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); + } + exports2.getExecOutput = getExecOutput; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js +var require_platform3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault2(require("os")); + var exec = __importStar2(require_exec3()); + var getWindowsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo = () => __awaiter2(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter2(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); + } + exports2.getDetails = getDetails; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js +var require_core3 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command3(); + var file_command_1 = require_file_command3(); + var utils_1 = require_utils8(); + var os3 = __importStar2(require("os")); + var path12 = __importStar2(require("path")); + var oidc_utils_1 = require_oidc_utils3(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable6(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable6; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; + } + exports2.addPath = addPath; + function getInput2(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); + } + exports2.getInput = getInput2; + function getMultilineInput(name, options) { + const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); + } + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput2(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput2(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput2; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed2(message) { + process.exitCode = ExitCode.Failure; + error3(message); + } + exports2.setFailed = setFailed2; + function isDebug2() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug2; + function debug6(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug6; + function error3(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error3; + function warning10(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning10; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info6(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info6; + function startGroup3(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup3; + function endGroup3() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup3; + function group(name, fn) { + return __awaiter2(this, void 0, void 0, function* () { + startGroup3(name); + let result; + try { + result = yield fn(); + } finally { + endGroup3(); + } + return result; + }); + } + exports2.group = group; + function saveState2(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.saveState = saveState2; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; + } + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter2(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); + } + exports2.getIDToken = getIDToken; + var summary_1 = require_summary3(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary3(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils3(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar2(require_platform3()); + } +}); + +// node_modules/@actions/tool-cache/lib/manifest.js +var require_manifest = __commonJS({ + "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2._readLinuxVersionFile = exports2._getOsVersion = exports2._findMatch = void 0; + var semver8 = __importStar2(require_semver2()); + var core_1 = require_core3(); + var os3 = require("os"); + var cp = require("child_process"); + var fs13 = require("fs"); + function _findMatch(versionSpec, stable, candidates, archFilter) { + return __awaiter2(this, void 0, void 0, function* () { + const platFilter = os3.platform(); + let result; + let match; + let file; + for (const candidate of candidates) { + const version = candidate.version; + (0, core_1.debug)(`check ${version} satisfies ${versionSpec}`); + if (semver8.satisfies(version, versionSpec) && (!stable || candidate.stable === stable)) { + file = candidate.files.find((item) => { + (0, core_1.debug)(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); + let chk = item.arch === archFilter && item.platform === platFilter; + if (chk && item.platform_version) { + const osVersion = module2.exports._getOsVersion(); + if (osVersion === item.platform_version) { + chk = true; + } else { + chk = semver8.satisfies(osVersion, item.platform_version); + } + } + return chk; + }); + if (file) { + (0, core_1.debug)(`matched ${candidate.version}`); + match = candidate; + break; + } + } + } + if (match && file) { + result = Object.assign({}, match); + result.files = [file]; + } + return result; + }); + } + exports2._findMatch = _findMatch; + function _getOsVersion() { + const plat = os3.platform(); + let version = ""; + if (plat === "darwin") { + version = cp.execSync("sw_vers -productVersion").toString(); + } else if (plat === "linux") { + const lsbContents = module2.exports._readLinuxVersionFile(); + if (lsbContents) { + const lines = lsbContents.split("\n"); + for (const line of lines) { + const parts = line.split("="); + if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { + version = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); + break; + } + } + } + } + return version; + } + exports2._getOsVersion = _getOsVersion; + function _readLinuxVersionFile() { + const lsbReleaseFile = "/etc/lsb-release"; + const osReleaseFile = "/etc/os-release"; + let contents = ""; + if (fs13.existsSync(lsbReleaseFile)) { + contents = fs13.readFileSync(lsbReleaseFile).toString(); + } else if (fs13.existsSync(osReleaseFile)) { + contents = fs13.readFileSync(osReleaseFile).toString(); + } + return contents; + } + exports2._readLinuxVersionFile = _readLinuxVersionFile; + } +}); + +// node_modules/@actions/tool-cache/lib/retry-helper.js +var require_retry_helper = __commonJS({ + "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -78414,7 +86057,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core14 = __importStar2(require_core3()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -78428,7 +86071,7 @@ var require_retry_helper = __commonJS({ } } execute(action, isRetryable) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { @@ -78451,7 +86094,7 @@ var require_retry_helper = __commonJS({ return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve6) => setTimeout(resolve6, seconds * 1e3)); }); } @@ -78464,7 +86107,7 @@ var require_retry_helper = __commonJS({ var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports2) { "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { @@ -78477,21 +86120,21 @@ var require_tool_cache = __commonJS({ if (k2 === void 0) k2 = k; o[k2] = m[k]; })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); - var __importStar4 = exports2 && exports2.__importStar || function(mod) { + var __importStar2 = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } - __setModuleDefault4(result, mod); + __setModuleDefault2(result, mod); return result; }; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function(resolve6) { resolve6(value); @@ -78520,19 +86163,19 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io4()); - var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); - var mm = __importStar4(require_manifest()); - var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); - var httpm = __importStar4(require_lib5()); - var semver8 = __importStar4(require_semver2()); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + var core14 = __importStar2(require_core3()); + var io6 = __importStar2(require_io3()); + var crypto2 = __importStar2(require("crypto")); + var fs13 = __importStar2(require("fs")); + var mm = __importStar2(require_manifest()); + var os3 = __importStar2(require("os")); + var path12 = __importStar2(require("path")); + var httpm = __importStar2(require_lib5()); + var semver8 = __importStar2(require_semver2()); + var stream2 = __importStar2(require("stream")); + var util = __importStar2(require("util")); var assert_1 = require("assert"); - var exec_1 = require_exec(); + var exec_1 = require_exec3(); var retry_helper_1 = require_retry_helper(); var HTTPError2 = class extends Error { constructor(httpStatusCode) { @@ -78546,8 +86189,8 @@ var require_tool_cache = __commonJS({ var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); + return __awaiter2(this, void 0, void 0, function* () { + dest = dest || path12.join(_getTempDirectory(), crypto2.randomUUID()); yield io6.mkdirP(path12.dirname(dest)); core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); @@ -78555,7 +86198,7 @@ var require_tool_cache = __commonJS({ 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 retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError2 && err.httpStatusCode) { @@ -78569,7 +86212,7 @@ var require_tool_cache = __commonJS({ } exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (fs13.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } @@ -78611,7 +86254,7 @@ var require_tool_cache = __commonJS({ }); } function extract7z(file, dest, _7zPath) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_WINDOWS, "extract7z() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78664,7 +86307,7 @@ var require_tool_cache = __commonJS({ } exports2.extract7z = extract7z; function extractTar2(file, dest, flags = "xz") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78708,7 +86351,7 @@ var require_tool_cache = __commonJS({ } exports2.extractTar = extractTar2; function extractXar(file, dest, flags = []) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { (0, assert_1.ok)(IS_MAC, "extractXar() not supported on current OS"); (0, assert_1.ok)(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); @@ -78729,7 +86372,7 @@ var require_tool_cache = __commonJS({ } exports2.extractXar = extractXar; function extractZip(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } @@ -78744,7 +86387,7 @@ var require_tool_cache = __commonJS({ } exports2.extractZip = extractZip; function extractZipWin(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io6.which("pwsh", false); @@ -78790,7 +86433,7 @@ var require_tool_cache = __commonJS({ }); } function extractZipNix(file, dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; if (!core14.isDebug()) { @@ -78801,7 +86444,7 @@ var require_tool_cache = __commonJS({ }); } function cacheDir(sourceDir, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78820,7 +86463,7 @@ var require_tool_cache = __commonJS({ } exports2.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); @@ -78884,7 +86527,7 @@ var require_tool_cache = __commonJS({ } exports2.findAllVersions = findAllVersions2; function getManifestFromRepo(owner, repo, auth, branch = "master") { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); @@ -78919,23 +86562,23 @@ var require_tool_cache = __commonJS({ } exports2.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os3.arch()) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports2.findFromManifest = findFromManifest; function _createExtractFolder(dest) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path12.join(_getTempDirectory(), crypto.randomUUID()); + dest = path12.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; }); } function _createToolPath(tool, version, arch2) { - return __awaiter4(this, void 0, void 0, function* () { + return __awaiter2(this, void 0, void 0, function* () { const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; @@ -79039,771 +86682,8 @@ var require_fast_deep_equal = __commonJS({ } }); -// node_modules/@actions/http-client/lib/proxy.js -var require_proxy5 = __commonJS({ - "node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getProxyUrl = getProxyUrl; - exports2.checkBypass = checkBypass; - function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - 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(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/http-client/lib/index.js -var require_lib6 = __commonJS({ - "node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); - } - __setModuleDefault4(result, mod); - return result; - }; - })(); - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.HttpClientResponse = exports2.HttpClientError = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - exports2.getProxyUrl = getProxyUrl; - exports2.isHttps = isHttps; - var http = __importStar4(require("http")); - var https2 = __importStar4(require("https")); - var pm = __importStar4(require_proxy5()); - var tunnel = __importStar4(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes; - (function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); - var Headers; - (function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; - })(Headers || (exports2.Headers = Headers = {})); - var MediaTypes; - (function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; - })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); - function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect - ]; - var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout - ]; - var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling = 10; - var ExponentialBackoffTimeSlice = 5; - var HttpClientError = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError; - var HttpClientResponse = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve6(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6) => __awaiter4(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve6(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - var HttpClient2 = class { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream2, additionalHeaders) { - return __awaiter4(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream2, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter4(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter4(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info6 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info6, data); - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info6, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info6 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info6, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info6, data) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve6(res); - } - } - this.requestRawWithCallback(info6, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info6, data, onResult) { - if (typeof data === "string") { - if (!info6.options.headers) { - info6.options.headers = {}; - } - info6.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info6.httpModule.request(info6.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info6.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info6 = {}; - info6.parsedUrl = requestUrl; - const usingSsl = info6.parsedUrl.protocol === "https:"; - info6.httpModule = usingSsl ? https2 : http; - const defaultPort = usingSsl ? 443 : 80; - info6.options = {}; - info6.options.host = info6.parsedUrl.hostname; - info6.options.port = info6.parsedUrl.port ? parseInt(info6.parsedUrl.port) : defaultPort; - info6.options.path = (info6.parsedUrl.pathname || "") + (info6.parsedUrl.search || ""); - info6.options.method = method; - info6.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info6.options.headers["user-agent"] = this.userAgent; - } - info6.options.agent = this._getAgent(info6.parsedUrl); - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info6.options); - } - } - return info6; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== void 0) { - return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default2) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === "number") { - clientHeader = String(headerValue); - } else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(", "); - } else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - if (additionalValue !== void 0) { - if (typeof additionalValue === "number") { - return String(additionalValue); - } else if (Array.isArray(additionalValue)) { - return additionalValue.join(", "); - } else { - return additionalValue; - } - } - if (clientHeader !== void 0) { - return clientHeader; - } - return _default2; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https2.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter4(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter4(this, void 0, void 0, function* () { - return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes.NotFound) { - resolve6(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve6(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient2; - var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - // node_modules/follow-redirects/debug.js -var require_debug2 = __commonJS({ +var require_debug3 = __commonJS({ "node_modules/follow-redirects/debug.js"(exports2, module2) { var debug6; module2.exports = function() { @@ -79831,7 +86711,7 @@ var require_follow_redirects = __commonJS({ var https2 = require("https"); var Writable = require("stream").Writable; var assert = require("assert"); - var debug6 = require_debug2(); + var debug6 = require_debug3(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; @@ -83223,14 +90103,14 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io2()); +var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); -var io = __toESM(require_io2()); +var io = __toESM(require_io()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -86118,7 +92998,7 @@ async function asyncSome(array, predicate) { } function unsafeEntriesInvariant(object) { return Object.entries(object).filter( - ([_, val2]) => val2 !== void 0 + ([_, val]) => val !== void 0 ); } @@ -86511,7 +93391,7 @@ var cliVersion = "2.23.8"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); -var actionsCache = __toESM(require_cache3()); +var actionsCache = __toESM(require_cache4()); // src/caching-utils.ts var core6 = __toESM(require_core()); @@ -86519,7 +93399,7 @@ var core6 = __toESM(require_core()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io2()); +var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -87312,7 +94192,7 @@ ${jsonContents}` } // src/trap-caching.ts -var actionsCache2 = __toESM(require_cache3()); +var actionsCache2 = __toESM(require_cache4()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -87887,7 +94767,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io2()); +var io4 = __toESM(require_io()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -88046,7 +94926,7 @@ var os2 = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); -var import_http_client = __toESM(require_lib6()); +var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); var semver6 = __toESM(require_semver2()); @@ -89787,13 +96667,13 @@ function fromString(str2, unsigned, radix) { return result; } Long.fromString = fromString; -function fromValue(val2, unsigned) { - if (typeof val2 === "number") return fromNumber(val2, unsigned); - if (typeof val2 === "string") return fromString(val2, unsigned); +function fromValue(val, unsigned) { + if (typeof val === "number") return fromNumber(val, unsigned); + if (typeof val === "string") return fromString(val, unsigned); return fromBits( - val2.low, - val2.high, - typeof unsigned === "boolean" ? unsigned : val2.unsigned + val.low, + val.high, + typeof unsigned === "boolean" ? unsigned : val.unsigned ); } Long.fromValue = fromValue; @@ -89865,8 +96745,8 @@ LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() { LongPrototype.getNumBitsAbs = function getNumBitsAbs() { if (this.isNegative()) return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs(); - var val2 = this.high != 0 ? this.high : this.low; - for (var bit = 31; bit > 0; bit--) if ((val2 & 1 << bit) != 0) break; + var val = this.high != 0 ? this.high : this.low; + for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break; return this.high != 0 ? bit + 33 : bit + 1; }; LongPrototype.isSafeInteger = function isSafeInteger() { @@ -90486,7 +97366,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io2()); +var io5 = __toESM(require_io()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/package-lock.json b/package-lock.json index 58da998e1..54e7f89e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "4.31.9", "license": "MIT", "dependencies": { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0", @@ -72,16 +72,15 @@ } }, "node_modules/@actions/artifact": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-4.0.0.tgz", - "integrity": "sha512-HCc2jMJRAfviGFAh0FsOR/jNfWhirxl7W6z8zDtttt0GltwxBLdEIjLiweOPFl9WbyJRW1VWnPUSAixJqcWUMQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-5.0.1.tgz", + "integrity": "sha512-dHJ5rHduhCKUikKTT9eXeWoUvfKia3IjR1sO/VTAV3DVAL4yMTRnl2iO5mcfiBjySHLwPNezwENAVskKYU5ymw==", "license": "MIT", "dependencies": { - "@actions/core": "^1.10.0", + "@actions/core": "^2.0.0", "@actions/github": "^6.0.1", - "@actions/http-client": "^2.1.0", - "@azure/core-http": "^3.0.5", - "@azure/storage-blob": "^12.15.0", + "@actions/http-client": "^3.0.0", + "@azure/storage-blob": "^12.29.1", "@octokit/core": "^5.2.1", "@octokit/plugin-request-log": "^1.0.4", "@octokit/plugin-retry": "^3.0.9", @@ -105,6 +104,25 @@ "tmp-promise": "^3.0.2" } }, + "node_modules/@actions/artifact-legacy/node_modules/@actions/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "license": "MIT", + "dependencies": { + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" + } + }, + "node_modules/@actions/artifact-legacy/node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "license": "MIT", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, "node_modules/@actions/artifact-legacy/node_modules/@actions/http-client": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", @@ -115,15 +133,11 @@ "undici": "^5.25.4" } }, - "node_modules/@actions/artifact/node_modules/@actions/http-client": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", - "license": "MIT", - "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } + "node_modules/@actions/artifact-legacy/node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" }, "node_modules/@actions/artifact/node_modules/@octokit/endpoint": { "version": "9.0.6", @@ -205,48 +219,23 @@ "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==" }, "node_modules/@actions/cache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.1.0.tgz", - "integrity": "sha512-z3Opg+P4Y7baq+g1dODXgdtsvPLSewr3ZKpp3U0HQR1A/vWCoJFS52XSezjdngo4SIOdR5oHtyK3a3Arar+X9A==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-5.0.1.tgz", + "integrity": "sha512-c+oH047Z2zmXLhjMZfEKjxZfv6Ou7T0sn5fhz6yupICXm5OOR47oZn5zxNO8MP7ttkxv5TOg3WsMrffri5Xhfw==", "license": "MIT", "dependencies": { - "@actions/core": "^1.11.1", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", + "@actions/core": "^2.0.0", + "@actions/exec": "^2.0.0", + "@actions/glob": "^0.5.0", + "@actions/http-client": "^3.0.0", + "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/storage-blob": "^12.29.1", "@protobuf-ts/runtime-rpc": "^2.11.1", "semver": "^6.3.1" } }, - "node_modules/@actions/cache/node_modules/@actions/glob": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.2.tgz", - "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", - "dependencies": { - "@actions/core": "^1.2.6", - "minimatch": "^3.0.4" - } - }, - "node_modules/@actions/cache/node_modules/@actions/http-client": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", - "license": "MIT", - "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } - }, - "node_modules/@actions/cache/node_modules/@actions/io": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", - "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", - "license": "MIT" - }, "node_modules/@actions/cache/node_modules/semver": { "version": "6.3.1", "license": "ISC", @@ -255,37 +244,24 @@ } }, "node_modules/@actions/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", - "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", - "dependencies": { - "@actions/exec": "^1.1.1", - "@actions/http-client": "^2.0.1" - } - }, - "node_modules/@actions/core/node_modules/@actions/http-client": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.1.tgz", + "integrity": "sha512-oBfqT3GwkvLlo1fjvhQLQxuwZCGTarTE5OuZ2Wg10hvhBj7LRIlF611WT4aZS6fDhO5ZKlY7lCAZTlpmyaHaeg==", "license": "MIT", "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" + "@actions/exec": "^2.0.0", + "@actions/http-client": "^3.0.0" } }, "node_modules/@actions/exec": { - "version": "1.1.1", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz", + "integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==", "license": "MIT", "dependencies": { - "@actions/io": "^1.0.1" + "@actions/io": "^2.0.0" } }, - "node_modules/@actions/exec/node_modules/@actions/io": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", - "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", - "license": "MIT" - }, "node_modules/@actions/github": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.1.tgz", @@ -426,6 +402,41 @@ "minimatch": "^3.0.4" } }, + "node_modules/@actions/glob/node_modules/@actions/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "license": "MIT", + "dependencies": { + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" + } + }, + "node_modules/@actions/glob/node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "license": "MIT", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/glob/node_modules/@actions/http-client": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", + "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "license": "MIT", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^5.25.4" + } + }, + "node_modules/@actions/glob/node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" + }, "node_modules/@actions/http-client": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.0.tgz", @@ -455,6 +466,25 @@ "semver": "^6.1.0" } }, + "node_modules/@actions/tool-cache/node_modules/@actions/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "license": "MIT", + "dependencies": { + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" + } + }, + "node_modules/@actions/tool-cache/node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "license": "MIT", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, "node_modules/@actions/tool-cache/node_modules/@actions/http-client": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", @@ -497,6 +527,8 @@ }, "node_modules/@azure/abort-controller": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", + "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", "license": "MIT", "dependencies": { "tslib": "^2.2.0" @@ -505,22 +537,18 @@ "node": ">=12.0.0" } }, - "node_modules/@azure/abort-controller/node_modules/tslib": { - "version": "2.4.0", - "license": "0BSD" - }, "node_modules/@azure/core-auth": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.8.0.tgz", - "integrity": "sha512-YvFMowkXzLbXNM11yZtVLhUCmuG0ex7JKOH366ipjmHBhL3vpDcPAeWF+jf0X+jVXwFqo3UhsWUq4kH0ZPdu/g==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-util": "^1.13.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { @@ -535,28 +563,22 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-auth/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, "node_modules/@azure/core-client": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.2.tgz", - "integrity": "sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", + "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-client/node_modules/@azure/abort-controller": { @@ -571,50 +593,18 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-client/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, - "node_modules/@azure/core-http": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.5.tgz", - "integrity": "sha512-T8r2q/c3DxNu6mEJfPuJtptUVqwchxzjj32gKcnMi06rdiVONS9rar7kT9T2Am+XvER7uOzpsP79WsqNbdgdWg==", - "deprecated": "This package is no longer supported. Please refer to https://github.com/Azure/azure-sdk-for-js/blob/490ce4dfc5b98ba290dee3b33a6d0876c5f138e2/sdk/core/README.md", - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/core-util": "^1.1.1", - "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.7", - "process": "^0.11.10", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.5.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/core-http-compat": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz", - "integrity": "sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.1.tgz", + "integrity": "sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.3.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-client": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-http-compat/node_modules/@azure/abort-controller": { @@ -629,106 +619,63 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-http-compat/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, - "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "license": "MIT", - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@azure/core-http/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@azure/core-http/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@azure/core-lro": { - "version": "2.5.3", - "license": "MIT", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.2.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-lro/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "node_modules/@azure/core-paging": { - "version": "1.5.0", - "license": "MIT", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-paging/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.17.0.tgz", - "integrity": "sha512-62Vv8nC+uPId3j86XJ0WI+sBf0jlqTqPUFCBNrGtlaUeQUIXWV/D8GE5A1d+Qx8H7OQojn2WguC8kChD6v0shA==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", + "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.9.0", + "@azure/core-util": "^1.2.0", "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, + "node_modules/@azure/core-lro/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-paging": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", + "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-rest-pipeline": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", + "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", @@ -741,41 +688,30 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, "node_modules/@azure/core-tracing": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.2.tgz", - "integrity": "sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, - "node_modules/@azure/core-tracing/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, "node_modules/@azure/core-util": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.10.0.tgz", - "integrity": "sha512-dqLWQsh9Nro1YQU+405POVtXnwrIVqPyfUzc4zXCbThTg7+vNNaiMkwbX9AMXKyoFYFClxmB3s25ZFr3+jZkww==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", + "@azure/abort-controller": "^2.1.2", + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { @@ -790,88 +726,55 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-util/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, "node_modules/@azure/core-xml": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.4.3.tgz", - "integrity": "sha512-D6G7FEmDiTctPKuWegX2WTrS1enKZwqYwdKTO6ZN6JMigcCehlT0/CYl+zWpI9vQ9frwwp7GQT3/owaEXgnOsA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.5.0.tgz", + "integrity": "sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw==", "license": "MIT", "dependencies": { - "fast-xml-parser": "^4.3.2", + "fast-xml-parser": "^5.0.7", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/logger": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", + "license": "MIT", + "dependencies": { + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-xml/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, - "node_modules/@azure/logger": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/logger/node_modules/tslib": { - "version": "2.6.0", - "license": "0BSD" - }, - "node_modules/@azure/ms-rest-js": { - "version": "2.7.0", - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.7", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.5.0" - } - }, - "node_modules/@azure/ms-rest-js/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "node": ">=20.0.0" } }, "node_modules/@azure/storage-blob": { - "version": "12.25.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.25.0.tgz", - "integrity": "sha512-oodouhA3nCCIh843tMMbxty3WqfNT+Vgzj3Xo5jqR9UPnzq3d7mzLjlHAYz7lW+b4km3SIgz+NAgztvhm7Z6kQ==", + "version": "12.29.1", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.29.1.tgz", + "integrity": "sha512-7ktyY0rfTM0vo7HvtK6E3UvYnI9qfd6Oz6z/+92VhGRveWng3kJwMKeUpqmW/NmwcDNbxHpSlldG+vsUnRFnBg==", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.3", + "@azure/core-http-compat": "^2.2.0", "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/core-xml": "^1.4.5", + "@azure/logger": "^1.1.4", + "@azure/storage-common": "^12.1.1", "events": "^3.0.0", - "tslib": "^2.2.0" + "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller": { @@ -886,11 +789,37 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/storage-blob/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" + "node_modules/@azure/storage-common": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.1.1.tgz", + "integrity": "sha512-eIOH1pqFwI6UmVNnDQvmFeSg0XppuzDLFeUNO/Xht7ODAzRLgGDh7h550pSxoA+lPDxBl1+D2m/KG3jWzCUjTg==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-http-compat": "^2.2.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "events": "^3.3.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } }, "node_modules/@es-joy/jsdoccomment": { "version": "0.76.0", @@ -2022,15 +1951,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "license": "Apache-2.0", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@pkgr/core": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", @@ -2287,37 +2207,12 @@ "version": "20.19.9", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.9.tgz", "integrity": "sha512-cuVNgarYWZqxRJDQHEB58GEONhOK79QVR/qYx4S7kcUObQvUwvFnYxJuuHUKm2aieN9X3yZB4LZsuYNU1Qphsw==", + "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" } }, - "node_modules/@types/node-fetch": { - "version": "2.6.13", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", - "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", - "license": "MIT", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.4" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@types/node-forge": { "version": "1.3.14", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", @@ -2360,15 +2255,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.48.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.1.tgz", @@ -3095,6 +2981,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.2.tgz", + "integrity": "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==", + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "dev": true, @@ -3471,10 +3371,6 @@ "integrity": "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==", "dev": true }, - "node_modules/asynckit": { - "version": "0.4.0", - "license": "MIT" - }, "node_modules/ava": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/ava/-/ava-6.4.1.tgz", @@ -3814,6 +3710,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -4028,16 +3925,6 @@ "version": "1.1.4", "license": "MIT" }, - "node_modules/combined-stream": { - "version": "1.0.8", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/comment-parser": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", @@ -4304,13 +4191,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/deprecation": { "version": "2.3.1", "license": "ISC" @@ -4348,6 +4228,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -4463,6 +4344,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -4471,6 +4353,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -4479,6 +4362,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, "dependencies": { "es-errors": "^1.3.0" }, @@ -4490,6 +4374,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", @@ -5500,22 +5385,18 @@ "license": "MIT" }, "node_modules/fast-xml-parser": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz", - "integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.3.tgz", + "integrity": "sha512-2O3dkPAAC6JavuMm8+4+pgTk+5hoAs+CjZ+sWcQLkX9+/tHRuTkQh/Oaifr8qDmZ8iEHb771Ea6G8CdwkrgvYA==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" } ], "license": "MIT", "dependencies": { - "strnum": "^1.0.5" + "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" @@ -5645,25 +5526,9 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", - "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/function-bind": { "version": "1.1.2", + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5732,6 +5597,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", @@ -5755,6 +5621,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" @@ -5934,6 +5801,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -5996,6 +5864,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -6007,6 +5876,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, "dependencies": { "has-symbols": "^1.0.3" }, @@ -6021,6 +5891,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -6794,6 +6665,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -6846,23 +6718,6 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-function": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", @@ -6953,6 +6808,7 @@ }, "node_modules/node-fetch": { "version": "2.6.7", + "dev": true, "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -7683,10 +7539,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/sax": { - "version": "1.2.4", - "license": "ISC" - }, "node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", @@ -8092,9 +7944,15 @@ } }, "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", + "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], "license": "MIT" }, "node_modules/supertap": { @@ -8211,13 +8069,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/synckit/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -8397,6 +8248,7 @@ }, "node_modules/tr46": { "version": "0.0.3", + "dev": true, "license": "MIT" }, "node_modules/traverse": { @@ -8431,7 +8283,9 @@ } }, "node_modules/tslib": { - "version": "1.14.1", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, "node_modules/tunnel": { @@ -8703,6 +8557,7 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, "license": "MIT" }, "node_modules/unicorn-magic": { @@ -8798,6 +8653,7 @@ }, "node_modules/webidl-conversions": { "version": "3.0.1", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/well-known-symbols": { @@ -8811,6 +8667,7 @@ }, "node_modules/whatwg-url": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3", @@ -8946,24 +8803,6 @@ "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/xml2js": { - "version": "0.5.0", - "license": "MIT", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "license": "MIT", - "engines": { - "node": ">=4.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index a1e9e63b8..e1713d69a 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,12 @@ }, "license": "MIT", "dependencies": { - "@actions/artifact": "^4.0.0", + "@actions/artifact": "^5.0.1", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", - "@actions/cache": "^4.1.0", - "@actions/core": "^1.11.1", - "@actions/exec": "^1.1.1", - "@actions/github": "^6.0.0", + "@actions/cache": "^5.0.1", + "@actions/core": "^2.0.1", + "@actions/exec": "^2.0.0", + "@actions/github": "^6.0.1", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", "@actions/io": "^2.0.0",